You are here

function _brightcove_client_access in Brightcove Video Connect 7.6

Same name and namespace in other branches
  1. 7.7 brightcove.client.inc \_brightcove_client_access()

Helper function for brightcove_client_access().

Parameters

$op:

string $bcid: The Brightcove Client bcid.

object $account: The drupal user object.

Return value

boolean

2 calls to _brightcove_client_access()
brightcove_client_access in ./brightcove.client.inc
Access callback for brightcove_client entity.
brightcove_get_clients_by_account_id in ./brightcove.client.inc
Loads all brightcove clients for a given brightcove account a drupal user has 'Use X client' permission to.

File

./brightcove.client.inc, line 500
Client related code.

Code

function _brightcove_client_access($op, $bcid, $account) {
  switch ($op) {
    case 'use':
      return user_access('use brightcove client ' . $bcid, $account) || user_access('administer brightcove settings', $account);
    default:
      return user_access('administer brightcove settings', $account);
  }
}