Skip to content

Commit

Permalink
Add controller role to User 1 (#496)
Browse files Browse the repository at this point in the history
* Update composer.json (#441)

* Give user 1 controller role for groups permissions.

---------

Co-authored-by: Finn Lewis <[email protected]>
Co-authored-by: Stephen Cox <[email protected]>
  • Loading branch information
3 people authored Nov 19, 2024
1 parent 7d700d5 commit 88a7563
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions localgov_microsites.install
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

use Drupal\user\Entity\Role;
use Drupal\user\Entity\User;

/**
* Implements hook_install().
Expand All @@ -23,6 +24,9 @@ function localgov_microsites_install() {
$role->grantPermission('administer redirects');
$role->save();
}

$admin = User::load(1);
$admin->addRole('microsites_controller');
}

/**
Expand Down

0 comments on commit 88a7563

Please sign in to comment.