You are here

function asset_perm in Asset 5.2

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

Implementation of hook_perm().

Related topics

File

./asset.module, line 225
Main module.

Code

function asset_perm() {
  foreach (asset_get_types() as $type) {
    $perms[] = 'create ' . $type->name . ' assets';
    $perms[] = 'edit ' . $type->name . ' assets';
  }

  // this is used to see the individual asset/# pages
  $perms[] = 'browse assets';

  // complete access to assets
  $perms[] = 'administer assets';
  return $perms;
}