@@ -45,53 +45,53 @@ port = 5000
[filter:proxy-prefix]
# prefix middleware for rc
use = egg:PasteDeploy#prefix
prefix = /<your-prefix>
[app:main]
use = egg:rhodecode
#filter-with = proxy-prefix
full_stack = true
static_files = true
# Optional Languages
# en, fr, ja, pt_BR, zh_CN, zh_TW
lang = en
cache_dir = %(here)s/data
index_dir = %(here)s/data/index
app_instance_uuid = rc-develop
cut_off_limit = 256000
force_https = false
commit_parse_limit = 25
use_gravatar = true
## alternative_gravatar_url allows you to use your own avatar server application
## the following parts of the URL will be replaced
## %(email)s user email
## %(md5email)s md5 hash of the user email (like at gravatar.com)
## %(size)s size of the image that is expected from the server application
#alternative_gravatar_url = http://myavatarserver.com/getbyemail/%(email)s/%(size)s
#alternative_gravatar_url = http://myavatarserver.com/getbymd5/%(md5email)s?s=%(size)s
## {email} user email
## {md5email} md5 hash of the user email (like at gravatar.com)
## {size} size of the image that is expected from the server application
#alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
#alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
container_auth_enabled = false
proxypass_auth_enabled = false
default_encoding = utf8
## overwrite schema of clone url
## available vars:
## scheme - http/https
## user - current user
## pass - password
## netloc - network location
## path - usually repo_name
#clone_uri = {scheme}://{user}{pass}{netloc}{path}
## issue tracking mapping for commits messages
## comment out issue_pat, issue_server, issue_prefix to enable
## pattern to get the issues from commit messages
## default one used here is #<numbers> with a regex passive group for `#`
## {id} will be all groups matched from this pattern
issue_pat = (?:\s*#)(\d+)
@@ -45,53 +45,53 @@ port = 8001
app_instance_uuid = rc-production
commit_parse_limit = 50
app_instance_uuid = ${app_instance_uuid}
@@ -692,51 +692,54 @@ def action_parser(user_log, feed=False):
tmpl = """<img src="%s%s" alt="%s"/>"""
ico = action_map.get(action, ['', '', ''])[2]
return literal(tmpl % ((url('/images/icons/')), ico, action))
# returned callbacks we need to call to get
return [lambda: literal(action), action_params_func, action_parser_icon]
#==============================================================================
# PERMS
from rhodecode.lib.auth import HasPermissionAny, HasPermissionAll, \
HasRepoPermissionAny, HasRepoPermissionAll
# GRAVATAR URL
def gravatar_url(email_address, size=30):
if(str2bool(config['app_conf'].get('use_gravatar')) and
config['app_conf'].get('alternative_gravatar_url')):
return config['app_conf'].get('alternative_gravatar_url') % {'email': email_address,
'md5email': hashlib.md5(email_address.lower()).hexdigest(),
'size': size}
tmpl = config['app_conf'].get('alternative_gravatar_url', '')
tmpl = tmpl.replace('{email}', email_address)\
.replace('{md5email}', hashlib.md5(email_address.lower()).hexdigest())\
.replace('{size}', str(size))
return tmpl
if (not str2bool(config['app_conf'].get('use_gravatar')) or
not email_address or email_address == 'anonymous@rhodecode.org'):
f = lambda a, l: min(l, key=lambda x: abs(x - a))
return url("/images/user%s.png" % f(size, [14, 16, 20, 24, 30]))
ssl_enabled = 'https' == request.environ.get('wsgi.url_scheme')
default = 'identicon'
baseurl_nossl = "http://www.gravatar.com/avatar/"
baseurl_ssl = "https://secure.gravatar.com/avatar/"
baseurl = baseurl_ssl if ssl_enabled else baseurl_nossl
if isinstance(email_address, unicode):
#hashlib crashes on unicode items
email_address = safe_str(email_address)
# construct the url
gravatar_url = baseurl + hashlib.md5(email_address.lower()).hexdigest() + "?"
gravatar_url += urllib.urlencode({'d': default, 's': str(size)})
return gravatar_url
# REPO PAGER, PAGER FOR REPOSITORY
Status change: