function opigno_tour_update_8001 in Opigno tour 3.x
Same name and namespace in other branches
- 8 opigno_tour.install \opigno_tour_update_8001()
Set tours access permissions for authenticated user role.
Implements hook_install().
File
- ./
opigno_tour.install, line 57 - Opigno Tour module install/uninstall functions.
Code
function opigno_tour_update_8001() {
$role = Role::load(RoleInterface::AUTHENTICATED_ID);
$issueAccessPermissions = [
'access tour',
];
foreach ($issueAccessPermissions as $permission) {
$role
->grantPermission($permission);
}
$role
->save();
}