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