Make account selection read only for non-admins

This commit is contained in:
Nathan Gray 2014-09-19 16:31:57 +00:00
parent 9555780834
commit 3cb9049199

View File

@ -511,7 +511,7 @@ app.classes.admin = AppJS.extend(
// Make sure selected values are there, account might not be in a default group
// so not in cache
if(content.acl_account)
if(content.acl_account && egw.user('apps')['admin'])
{
var accounts = this.egw.accounts('both');
var there = false;
@ -529,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});});
}
}
else if (content.acl_account)
{
readonlys.acl_account = true;
}
if(content.acl_location)
{
sel_options.acl_location = jQuery.extend({},sel_options.acl_location);