##// END OF EJS Templates
vcs: Minimal change to expose the shadow repository...
vcs: Minimal change to expose the shadow repository Based on my original research, this was the "minimal" starting point. It shows that three concepts are needed for the "repo_name": * From the security standpoint we think of the shadow repository having the same ACL as the target repository of the pull request. This is because the pull request itself is considered to be a part of the target repository. Out of this thought, the variable "acl_repo_name" is used whenever we want to check permissions or when we need the database configuration of the repository. An alternative name would have been "db_repo_name", but the usage for ACL checking is the most important one. * From the web interaction perspective, we need the URL which was originally used to get to the repository. This is because based on this base URL commands can be identified. Especially for Git this is important, so that the commands are correctly recognized. Since the URL is in the focus, this is called "url_repo_name". * Finally we have to deal with the repository on the file system. This is what the VCS layer deal with normally, so this name is called "vcs_repo_name". The original repository interaction is a special case where all three names are the same. When interacting with a pull request, these three names are typically all different. This change is minimal in a sense that it just makes the interaction with a shadow repository barely work, without checking any special constraints yet. This was the starting point for further work on this topic.

File last commit:

r349:cf7b740d default
r887:175782be default
Show More
settings_system.html
89 lines | 3.6 KiB | text/html | HtmlLexer
<%
elems = [
## general
(_('RhodeCode Enterprise version'), h.literal('%s <div class="link" id="check_for_update" >%s</div>' % (c.rhodecode_version, _('check for updates'))), ''),
(_('Upgrade info endpoint'), h.literal('%s <br/><span >%s.</span>' % (c.rhodecode_update_url, _('Note: please make sure this server can access this url'))), ''),
(_('Configuration INI file'), c.rhodecode_config_ini, ''),
## systems stats
(_('RhodeCode Enterprise Server IP'), c.server_ip, ''),
(_('RhodeCode Enterprise Server ID'), c.server_id, ''),
(_('Platform'), c.platform, ''),
(_('Uptime'), c.uptime_age, ''),
(_('Storage location'), c.storage, ''),
(_('Storage disk space'), "%s/%s, %s%% used%s" % (h.format_byte_size_binary(c.disk['used']), h.format_byte_size_binary(c.disk['total']),(c.disk['percent']), ' %s' % c.disk['error'] if 'error' in c.disk else ''), ''),
(_('Search index storage'), c.index_storage, ''),
(_('Search index size'), "%s %s" % (h.format_byte_size_binary(c.disk_index['used']), ' %s' % c.disk_index['error'] if 'error' in c.disk_index else ''), ''),
(_('Gist storage'), c.gist_storage, ''),
(_('Gist storage size'), "%s (%s items)%s" % (h.format_byte_size_binary(c.disk_gist['used']),c.disk_gist['items'], ' %s' % c.disk_gist['error'] if 'error' in c.disk_gist else ''), ''),
(_('Archive cache'), h.literal('%s <br/><span >%s.</span>' % (c.archive_storage, _('Enable this by setting archive_cache_dir=/path/to/cache option in the .ini file'))), ''),
(_('Archive cache size'), "%s%s" % (h.format_byte_size_binary(c.disk_archive['used']), ' %s' % c.disk_archive['error'] if 'error' in c.disk_archive else ''), ''),
(_('System memory'), c.system_memory, ''),
(_('CPU'), '%s %%' %(c.cpu), ''),
(_('Load'), '1min: %s, 5min: %s, 15min: %s' %(c.load['1_min'],c.load['5_min'],c.load['15_min']), ''),
## rhodecode stuff
(_('Python version'), c.py_version, ''),
(_('Python path'), c.py_path, ''),
(_('GIT version'), c.git_version, ''),
(_('HG version'), c.hg_version, ''),
(_('SVN version'), c.svn_version, ''),
(_('Database'), "%s @ version: %s" % (c.db_type, c.db_migrate_version), ''),
(_('Database version'), c.db_version, ''),
]
%>
<div id="update_notice" style="display: none; margin: -40px 0px 20px 0px">
<div>${_('Checking for updates...')}</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_('System Info')}</h3>
% if c.allowed_to_snapshot:
<a href="${url('admin_settings_system', snapshot=1)}" class="panel-edit">${_('create snapshot')}</a>
% endif
</div>
<div class="panel-body">
<dl class="dl-horizontal settings">
%for dt, dd, tt in elems:
<dt>${dt}:</dt>
<dd title="${tt}">${dd}</dd>
%endfor
</dl>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_('Python Packages')}</h3>
</div>
<div class="panel-body">
<table class="table">
<colgroup>
<col class='label'>
<col class='content'>
</colgroup>
<tbody>
%for key, value in c.py_modules:
<tr>
<td>${key}</td>
<td>${value}</td>
</tr>
%endfor
</tbody>
</table>
</div>
</div>
<script>
$('#check_for_update').click(function(e){
$('#update_notice').show();
$('#update_notice').load("${h.url('admin_settings_system_update',version=c.rhodecode_version, platform=c.platform)}");
})
</script>