You are here

function fb_app_access in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 5 fb_app.module \fb_app_access()

File

./fb_app.module, line 106
Defines a custom node type that stores a facebook application configuration.

Code

function fb_app_access($op, $node) {
  global $user;
  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;
      }
    }
  }
}