Verified Commit afe1a753 authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: Feat(posix)

Apply group from template

Apply group from template.
Showing with 1 addition and 1 deletion
+1 -1
...@@ -620,6 +620,7 @@ class posixAccount extends simplePlugin ...@@ -620,6 +620,7 @@ class posixAccount extends simplePlugin
return $errors; return $errors;
} }
// This allows to add new groups asignment on top of existing one !
if (!$this->is_template && !class_available('mixedGroup')) { if (!$this->is_template && !class_available('mixedGroup')) {
/* Take care about groupMembership values: add to groups */ /* Take care about groupMembership values: add to groups */
$groupMembership = $this->attributesAccess['groupMembership']->getValue(); $groupMembership = $this->attributesAccess['groupMembership']->getValue();
...@@ -715,7 +716,6 @@ class posixAccount extends simplePlugin ...@@ -715,7 +716,6 @@ class posixAccount extends simplePlugin
$this->attributesAccess['mustchangepassword']->setInLdap(FALSE); $this->attributesAccess['mustchangepassword']->setInLdap(FALSE);
$this->attributesAccess['groupMembership']->setInLdap(FALSE); $this->attributesAccess['groupMembership']->setInLdap(FALSE);
$this->savedGroupMembership = $this->groupMembership;
if (isset($this->attrs['posixGroups'])) { if (isset($this->attrs['posixGroups'])) {
unset($this->attrs['posixGroups']['count']); unset($this->attrs['posixGroups']['count']);
$this->groupMembership = $this->attrs['posixGroups']; $this->groupMembership = $this->attrs['posixGroups'];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment