You are here

function scald_scald_atom_access in Scald: Media Management made easy 7

Implements hook_scald_atom_access().

Currently only 'create' action is implemented.

File

./scald.module, line 1719
The Scald Core, which handles all Scald Registries and dispatch.

Code

function scald_scald_atom_access($atom, $action, $account = NULL) {
  switch ($action) {
    case 'create':
      if (user_access('create atom of any type') || user_access('create atom of ' . $atom->type . ' type')) {
        return SCALD_ATOM_ACCESS_ALLOW;
      }
      break;
  }
  return SCALD_ATOM_ACCESS_IGNORE;
}