You are here

function asset_edition_access in Asset 7

Check what user have access to edit asset with given type.

3 calls to asset_edition_access()
assets_entity_access_callback in ./asset.module
Access callback for the entity API.
assets_pre_render_text_format in ./asset.module
This function adds a settings required by assets
template_preprocess_asset_widget_edit_buttons in modules/asset_widget/theme/theme.inc
Preprocess variables for asset-widget-edit-buttons.tpl.php.
1 string reference to 'asset_edition_access'
asset_menu in ./asset.module
Implements hook_menu().

File

./asset.module, line 253
Asset module.

Code

function asset_edition_access($type, $account = NULL) {
  $type = is_object($type) && $type->type ? $type->type : $type;
  return user_access('administer assets', $account) || user_access("edit asset with type {$type}", $account);
}