mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-04 04:59:32 +01:00
UI improvements to Access dialog for non-admin users
This commit is contained in:
parent
72c2b67eb5
commit
b0907096bf
@ -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
|
||||||
@ -506,7 +511,7 @@ app.classes.admin = AppJS.extend(
|
|||||||
|
|
||||||
// Make sure selected values are there, account might not be in a default group
|
// Make sure selected values are there, account might not be in a default group
|
||||||
// so not in cache
|
// so not in cache
|
||||||
if(content.acl_account)
|
if(content.acl_account && egw.user('apps')['admin'])
|
||||||
{
|
{
|
||||||
var accounts = this.egw.accounts('both');
|
var accounts = this.egw.accounts('both');
|
||||||
var there = false;
|
var there = false;
|
||||||
@ -524,6 +529,10 @@ app.classes.admin = AppJS.extend(
|
|||||||
this.egw.link_title('home-accounts', content.acl_account, function(title) {sel_options.acl_account.push({value: content.acl_account, label: title});});
|
this.egw.link_title('home-accounts', content.acl_account, function(title) {sel_options.acl_account.push({value: content.acl_account, label: title});});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (content.acl_account)
|
||||||
|
{
|
||||||
|
readonlys.acl_account = true;
|
||||||
|
}
|
||||||
if(content.acl_location)
|
if(content.acl_location)
|
||||||
{
|
{
|
||||||
sel_options.acl_location = jQuery.extend({},sel_options.acl_location);
|
sel_options.acl_location = jQuery.extend({},sel_options.acl_location);
|
||||||
|
@ -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