mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
Fix access UI to take user's permissions into account, and not let them try to edit run rights
This commit is contained in:
parent
d0ac7525b6
commit
2ab51680be
@ -409,10 +409,12 @@ class admin_acl
|
|||||||
'caption' => 'Edit',
|
'caption' => 'Edit',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'allowOnMultiple' => false,
|
'allowOnMultiple' => false,
|
||||||
|
'disableClass' => 'rowNoEdit',
|
||||||
'onExecute' => 'javaScript:app.admin.acl',
|
'onExecute' => 'javaScript:app.admin.acl',
|
||||||
),
|
),
|
||||||
'add' => array(
|
'add' => array(
|
||||||
'caption' => 'Add',
|
'caption' => 'Add',
|
||||||
|
'disableClass' => 'rowNoEdit',
|
||||||
'onExecute' => 'javaScript:app.admin.acl',
|
'onExecute' => 'javaScript:app.admin.acl',
|
||||||
),
|
),
|
||||||
'delete' => array(
|
'delete' => array(
|
||||||
|
@ -468,6 +468,11 @@ app.classes.admin = AppJS.extend(
|
|||||||
{
|
{
|
||||||
content.acl_location = this.et2.getWidgetById('filter').getValue() == 'run' ? 'run' : null;
|
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')
|
if(content.acl_location == 'run')
|
||||||
{
|
{
|
||||||
// These are the apps the account has access to
|
// These are the apps the account has access to
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<nextmatch-header label="Custom 2" id="custom2"/>
|
<nextmatch-header label="Custom 2" id="custom2"/>
|
||||||
<nextmatch-header label="Custom 3" id="custom3"/>
|
<nextmatch-header label="Custom 3" id="custom3"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row class="$row_cont[class]">
|
||||||
<appicon align="center" src="$row_cont[acl_appname]" class="admin_aclApp"/>
|
<appicon align="center" src="$row_cont[acl_appname]" class="admin_aclApp"/>
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup type="select-app" id="${row}[acl_appname]" readonly="true"/>
|
<menupopup type="select-app" id="${row}[acl_appname]" readonly="true"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user