public function OpignoModuleManagerController::ajaxCheckedActivitiesAccess in Opigno module 3.x
Same name and namespace in other branches
- 8 src/Controller/OpignoModuleManagerController.php \Drupal\opigno_module\Controller\OpignoModuleManagerController::ajaxCheckedActivitiesAccess()
Check access.
1 string reference to 'OpignoModuleManagerController::ajaxCheckedActivitiesAccess'
File
- src/
Controller/ OpignoModuleManagerController.php, line 154
Class
- OpignoModuleManagerController
- Controller for all the actions of the Opigno module manager.
Namespace
Drupal\opigno_module\ControllerCode
public function ajaxCheckedActivitiesAccess() {
$account = $this
->currentUser();
$is_content_manager = LearningPathAccess::memberHasRole('content_manager', $account);
if ($is_content_manager > 0 || $account
->hasPermission('administer module entities')) {
return AccessResult::allowed();
}
else {
return AccessResult::forbidden();
}
}