Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
added array permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
yeniatencio committed Nov 29, 2023
1 parent 0fffc9d commit 039025e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tide_site.install
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ function tide_site_install() {
*/
function tide_site_update_10000() {
$approver = Role::load('approver');
$permissions = [
'create terms in sites',
'edit terms in sites',
];
if ($approver) {
$approver->grantPermission('create terms in sites', 'edit terms in sites');
foreach ($permissions as $permission) {
$approver->grantPermission($permission);
}
$approver->save();
}
}

0 comments on commit 039025e

Please sign in to comment.