Merge pull request #99 from steffen-moser/fixAutoSyncForGroupOfMembers

Adding groupOfMembers to the GON types
This commit is contained in:
gruberroland 2020-06-06 10:41:54 +02:00 committed by GitHub
commit 82905cb4e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -327,6 +327,9 @@ class posixGroup extends baseModule implements passwordService {
if ($gon == null) { if ($gon == null) {
$gon = $this->getAccountContainer()->getAccountModule('groupOfUniqueNames'); $gon = $this->getAccountContainer()->getAccountModule('groupOfUniqueNames');
} }
if ($gon == null) {
$gon = $this->getAccountContainer()->getAccountModule('groupOfMembers');
}
if ($gon != null) { if ($gon != null) {
$return->addVerticalSpacer('2rem'); $return->addVerticalSpacer('2rem');
$syncButton = new htmlButton('syncGON', sprintf(_('Sync from %s'), $gon->get_alias())); $syncButton = new htmlButton('syncGON', sprintf(_('Sync from %s'), $gon->get_alias()));
@ -514,7 +517,7 @@ class posixGroup extends baseModule implements passwordService {
$this->addAccountSpecificConfigOptions($configContainer, $typeId); $this->addAccountSpecificConfigOptions($configContainer, $typeId);
$configContainer->addVerticalSpacer('2rem'); $configContainer->addVerticalSpacer('2rem');
} }
$gonModules = array('groupOfNames', 'groupOfUniqueNames'); $gonModules = array('groupOfNames', 'groupOfUniqueNames', 'groupOfMembers');
$gonFound = false; $gonFound = false;
foreach ($gonModules as $gonModule) { foreach ($gonModules as $gonModule) {
if (!empty($allScopes[$gonModule])) { if (!empty($allScopes[$gonModule])) {
@ -978,6 +981,9 @@ class posixGroup extends baseModule implements passwordService {
if ($gon == null) { if ($gon == null) {
$gon = $this->getAccountContainer()->getAccountModule('groupOfUniqueNames'); $gon = $this->getAccountContainer()->getAccountModule('groupOfUniqueNames');
} }
if ($gon == null) {
$gon = $this->getAccountContainer()->getAccountModule('groupOfMembers');
}
if ($gon == null) { if ($gon == null) {
return; return;
} }