function fb_app_access in Drupal for Facebook 5
Same name and namespace in other branches
- 5.2 fb_app.module \fb_app_access()
File
- ./
fb_app.module, line 87 - Defines a custom node type that stores a facebook application configuration.
Code
function fb_app_access($op, $node) {
if (user_access('administer fb apps')) {
return TRUE;
}
if ($op == 'create' && user_access('create fb apps')) {
return TRUE;
}
else {
if ($op == 'update' || $op == 'delete') {
if ($node->uid == $user->uid && user_access('edit own fb apps')) {
return TRUE;
}
}
}
}