From 3cb9049199676a5ebf9e709451d26f438f6bc3d7 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 19 Sep 2014 16:31:57 +0000 Subject: [PATCH] Make account selection read only for non-admins --- admin/js/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/js/app.js b/admin/js/app.js index 9c0ac0ed36..93d064bf17 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -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);