function notifications_subscription_access in Notifications 6.3
Same name and namespace in other branches
- 6.4 notifications.module \notifications_subscription_access()
- 6 notifications.module \notifications_subscription_access()
- 6.2 notifications.module \notifications_subscription_access()
Menu access callback
1 string reference to 'notifications_subscription_access'
- notifications_menu in ./
notifications.module - Implementation of hook_menu().
File
- ./
notifications.module, line 268 - Notifications module
Code
function notifications_subscription_access($op, $subscription, $account = NULL) {
global $user;
$account = $account ? $account : $user;
if (user_access('administer notifications') || user_access('manage all subscriptions')) {
return TRUE;
}
switch ($op) {
case 'edit':
case 'unsubscribe':
return $account->uid && $subscription->uid == $account->uid && user_access('maintain own subscriptions');
}
return FALSE;
}