function patron_access in Library 5.2
Same name and namespace in other branches
- 6 patron/patron.module \patron_access()
Implemenation of hook_access().
1 call to patron_access()
- library_history in ./
library.pages.inc - Menu callback; show the transaction history of a single node.
File
- patron/
patron.module, line 82
Code
function patron_access($op, $node, $account) {
if ($op == 'view') {
//Come back and change this to change patron_uid
if (user_access('view patron content', $account) || user_access('view own patron content', $account) && $account->uid == $node->uid) {
return TRUE;
}
else {
return FALSE;
}
}
if ($op == 'create') {
return user_access('create patron content', $account);
}
if ($op == 'update') {
if (user_access('edit any patron content', $account) || user_access('edit own patron content', $account) && $account->uid == $node->uid) {
return TRUE;
}
}
if ($op == 'delete') {
return user_access('delete patron content', $account);
}
}