You are here

function properties_admin_access in Dynamic properties 7

Check access to an administration page.

Parameters

$type: Either categories or attributes.

Return value

TRUE if access is allowed.

2 string references to 'properties_admin_access'
properties_menu in ./properties.module
Implements hook_menu().
properties_template_menu in properties_template/properties_template.module
Implements hook_menu().

File

./properties.module, line 192
This module provides a dynamic property field that can contain an unlimited number of attribute value pairs.

Code

function properties_admin_access($type = NULL) {
  if (empty($type)) {
    return user_access('administer properties attributes') || user_access('administer properties categories');
  }
  else {
    return user_access('administer properties ' . $type);
  }
}