function opigno_learning_path_update_8033 in Opigno Learning path 8
Add access to contectual links.
File
- ./
opigno_learning_path.install, line 897 - Install, update and uninstall functions for the module.
Code
function opigno_learning_path_update_8033() {
// Grand users for access to contextual links.
$permission = 'access contextual links';
$role = Role::load('content_manager');
if ($role) {
$role
->grantPermission($permission);
$role
->save();
}
$role = Role::load('user_manager');
if ($role) {
$role
->grantPermission($permission);
$role
->save();
}
$permission = 'bypass group access';
$role = Role::load('content_manager');
if ($role) {
$role
->grantPermission($permission);
$role
->save();
}
}