You are here

function avatar_selection_access in Avatar Selection 5.2

Same name and namespace in other branches
  1. 5 avatar_selection.module \avatar_selection_access()
  2. 6 avatar_selection.module \avatar_selection_access()

Implementation of hook_access().

File

./avatar_selection.module, line 42
The Avatar Selection module allows the user to pick an avatar image from a list already loaded by an administrative user, and to the administrator to disable uploading other avatar files by the user.

Code

function avatar_selection_access($op, $node) {
  if ($op == 'view') {
    return user_access('access avatars');
  }
  elseif ($op == 'create' || $op == 'update' || $op == 'delete') {
    return user_access('administer avatar selection');
  }
}