mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 20:40:14 +01:00
fixed account-selection-type "primary_group" to only show membership-groups by default
This commit is contained in:
parent
ba0b87f6bc
commit
60f1ca4033
@ -390,7 +390,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':
|
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'];
|
||||||
|
Loading…
Reference in New Issue
Block a user