You are here

function notifications_user_allowed_subscription in Notifications 6.4

Check access to create/edit subscriptions

5 calls to notifications_user_allowed_subscription()
NotificationsContentTests::testNotificationsContent in tests/notifications_content.test
Play with creating, retrieving, deleting a pair subscriptions
notifications_anonymous_page_subscribe in notifications_anonymous/notifications_anonymous.pages.inc
Menu callback add subscription
notifications_object_user_subscriptions in includes/object.inc
Get list of possible and existing subscriptions for user/object
notifications_page_subscribe in ./notifications.pages.inc
Menu callback add subscription
Notifications_Subscription::check_access in includes/notifications_subscription.class.inc
Check permission for user account

File

./notifications.module, line 1685
Notifications module

Code

function notifications_user_allowed_subscription($account, $subscription) {

  // For administrators, everything is allowed
  if (user_access('administer notifications', $account)) {
    return TRUE;
  }
  else {
    return notifications_user_allowed('subscription', $account, $subscription);
  }
}