fixed account-selection-type "primary_group" to only show membership-groups by default

This commit is contained in:
Ralf Becker 2015-03-10 16:06:22 +00:00
parent 8ec7d08589
commit 4c82f2cee2
2 changed files with 17 additions and 1 deletions

View File

@ -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);
}, },
/** /**

View File

@ -392,6 +392,7 @@ class accounts
case 'groups': case 'groups':
$type = $only_own ? 'memberships' : 'groups'; $type = $only_own ? 'memberships' : 'groups';
break; break;
case 'owngroups':
case 'groupmembers': case 'groupmembers':
case 'memberships': case 'memberships':
$type = $options['account_type']; $type = $options['account_type'];