forked from extern/egroupware
fixed account-selection-type "primary_group" to only show membership-groups by default
This commit is contained in:
parent
8ec7d08589
commit
4c82f2cee2
@ -380,7 +380,22 @@ var et2_selectAccount = et2_selectbox.extend(
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.options.select_options.concat(this.egw().accounts(this.options.account_type));
|
||||
var type = this.egw().preference('account_selection', 'common');
|
||||
var accounts = [];
|
||||
// for primary_group we only display owngroups == own memberships, not other groups
|
||||
if (type == 'primary_group' && this.options.account_type != 'accounts')
|
||||
{
|
||||
if (this.options.account_type == 'both')
|
||||
{
|
||||
accounts = this.egw().accounts('accounts');
|
||||
}
|
||||
accounts = accounts.concat(this.egw().accounts('owngroups'));
|
||||
}
|
||||
else
|
||||
{
|
||||
accounts = this.egw().accounts(this.options.account_type);
|
||||
}
|
||||
return this.options.select_options.concat(accounts);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -392,6 +392,7 @@ class accounts
|
||||
case 'groups':
|
||||
$type = $only_own ? 'memberships' : 'groups';
|
||||
break;
|
||||
case 'owngroups':
|
||||
case 'groupmembers':
|
||||
case 'memberships':
|
||||
$type = $options['account_type'];
|
||||
|
Loading…
Reference in New Issue
Block a user