You are here

function asset_creation_access in Asset 7

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

3 calls to asset_creation_access()
assets_pre_render_text_format in ./asset.module
This function adds a settings required by assets
asset_widget_get_tabs_info in modules/asset_widget/asset_widget.module
Return all possible widget tabs to render.
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_creation_access'
asset_menu in ./asset.module
Implements hook_menu().

File

./asset.module, line 246
Asset module.

Code

function asset_creation_access($type, $account = NULL) {
  return user_access('administer assets', $account) || user_access("create asset with type {$type}", $account);
}