You are here

function opigno_learning_path_user_access in Opigno Learning path 8

Same name and namespace in other branches
  1. 3.x opigno_learning_path.module \opigno_learning_path_user_access()

Implements hook_ENTITY_TYPE_access().

File

./opigno_learning_path.module, line 1996
Contains opigno_learning_path.module.

Code

function opigno_learning_path_user_access(EntityInterface $entity, $operation, AccountInterface $account) {
  if ($account
    ->hasPermission('manage group members in any group')) {

    // Allow platform-level user managers to view/edit/delete users.
    return AccessResult::allowed();
  }
  return AccessResult::neutral();
}