You are here

public function Notifications_Subscription::type_access in Notifications 7

User access function

1 call to Notifications_Subscription::type_access()
Notifications_Subscription::user_access in ./notifications.subscription.inc
Check user access to this subscription

File

./notifications.subscription.inc, line 924
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

public function type_access($account) {
  $access = $this
    ->get_info('access');

  // Access may be true/false or an array of permissions
  if ($access && is_array($access)) {
    foreach ($access as $perm) {
      if (!user_access($perm, $account)) {
        return FALSE;
      }
    }
    return TRUE;
  }
  else {
    return (bool) $access;
  }
}