function quotes_access in Quotes 5
Same name and namespace in other branches
- 6 quotes.module \quotes_access()
Implementation of hook_access().
File
- ./
quotes.module, line 41
Code
function quotes_access($op, $node) {
global $user;
switch ($op) {
case 'create':
return user_access('create quotes') || user_access('import quotes') || user_access('edit own quotes');
case 'update':
case 'delete':
if (user_access('edit own quotes') && $user->uid == $node->uid) {
return TRUE;
}
if (user_access('administer quotes')) {
return TRUE;
}
return;
case 'view':
if (user_access('access quotes')) {
return TRUE;
}
return;
}
}