Skip to content
Prev Previous commit
Next Next commit
Allow admins to see accounts dropdown and only hide lists for users
  • Loading branch information
Anurag Awasthi
Anurag Awasthi committed Jul 12, 2019
commit 1555d317c0bff5d795b0f1e17c3dc0f2d6fd2ad1
2 changes: 1 addition & 1 deletion ui/scripts/sharedFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var g_queryAsyncJobResultInterval = 3000;
var g_idpList = null;
var g_appendIdpDomain = false;
var g_sortKeyIsAscending = false;
var g_allowUserViewAllDomainAccounts= "false";
var g_allowUserViewAllDomainAccounts= false;

//keyboard keycode
var keycode_Enter = 13;
Expand Down
4 changes: 2 additions & 2 deletions ui/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@
// allow.user.view.domain.accounts = true
// Populate List of accounts in domain as dropdown multiselect
$form.find('[rel=sharewith]').css('display', 'inline-block');
if (g_allowUserViewAllDomainAccounts === true) {
if (!isUser() || g_allowUserViewAllDomainAccounts === true) {
$form.find('[rel=projects]').css('display', 'inline-block');
$form.find('[rel=accounts]').css('display', 'inline-block');
$form.find('[rel=accountlist]').hide();
Expand Down Expand Up @@ -1606,7 +1606,7 @@
} else {
// allow.user.view.domain.accounts = true
// Populate List of accounts in domain as dropdown multiselect
if (g_allowUserViewAllDomainAccounts === true) {
if (!isUser() || g_allowUserViewAllDomainAccounts === true) {
$form.find('[rel=projects]').hide();
$form.find('[rel=accountlist]').hide();
$form.find('[rel=accounts]').css('display', 'inline-block');
Expand Down