Unverified Commit 14a3a22f authored by Alex Pott's avatar Alex Pott
Browse files

fix: #3570220 RoleSettingsForm::submitForm() should not load config overrides

By: prudloff
By: berdir
(cherry picked from commit f5b6540a)
parent 389e9ca3
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -96,11 +96,11 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
        ->condition('is_admin', TRUE)
        ->execute();
      foreach ($admin_roles as $rid) {
        $this->roleStorage->load($rid)->setIsAdmin(FALSE)->save();
        $this->roleStorage->loadOverrideFree($rid)->setIsAdmin(FALSE)->save();
      }
      $new_admin_role = $form_state->getValue('user_admin_role');
      if ($new_admin_role) {
        $this->roleStorage->load($new_admin_role)->setIsAdmin(TRUE)->save();
        $this->roleStorage->loadOverrideFree($new_admin_role)->setIsAdmin(TRUE)->save();
      }
      $this->messenger()->addStatus($this->t('The role settings have been updated.'));
    }