Commit c3f0889c authored by Christopher Hopper's avatar Christopher Hopper Committed by Kristiaan Van den Eynde
Browse files

Issue #3281530 by chOP: Error saving Group Type permissions with administrative role enabled

parent 6e9eecba
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -306,6 +306,9 @@ abstract class GroupPermissionsForm extends FormBase {
  function submitForm(array &$form, FormStateInterface $form_state) {
    foreach ($this->getGroupRoles() as $role_name => $group_role) {
      assert($group_role instanceof GroupRoleInterface);
      if ($group_role->isAdmin()) {
        continue;
      }
      $permissions = $form_state->getValue($role_name);
      $group_role->changePermissions($permissions)->trustData()->save();
    }