Fix access UI to take user's permissions into account, and not let them try to edit run rights

This commit is contained in:
Nathan Gray 2014-09-18 15:01:08 +00:00
parent d0ac7525b6
commit 2ab51680be
3 changed files with 8 additions and 1 deletions

View File

@ -409,10 +409,12 @@ class admin_acl
'caption' => 'Edit',
'default' => true,
'allowOnMultiple' => false,
'disableClass' => 'rowNoEdit',
'onExecute' => 'javaScript:app.admin.acl',
),
'add' => array(
'caption' => 'Add',
'disableClass' => 'rowNoEdit',
'onExecute' => 'javaScript:app.admin.acl',
),
'delete' => array(

View File

@ -468,6 +468,11 @@ app.classes.admin = AppJS.extend(
{
content.acl_location = this.et2.getWidgetById('filter').getValue() == 'run' ? 'run' : null;
}
// If no admin rights, change UI to not allow adding access to apps
if(content.acl_location == 'run' && !egw.user('apps')['admin'])
{
content.acl_location = null;
}
if(content.acl_location == 'run')
{
// These are the apps the account has access to

View File

@ -35,7 +35,7 @@
<nextmatch-header label="Custom 2" id="custom2"/>
<nextmatch-header label="Custom 3" id="custom3"/>
</row>
<row>
<row class="$row_cont[class]">
<appicon align="center" src="$row_cont[acl_appname]" class="admin_aclApp"/>
<menulist>
<menupopup type="select-app" id="${row}[acl_appname]" readonly="true"/>