You are here

function revisioning_user_access_all in Revisioning 7

Same name and namespace in other branches
  1. 8 revisioning_api.inc \revisioning_user_access_all()

Return TRUE only if the user account has ALL of the supplied permissions.

Parameters

array $permissions: An array of permissions (strings)

object $account: (optional) The user account object. Defaults to current user if omitted.

Return value

bool Whether the user has access to all permissions

File

./revisioning_api.inc, line 733
API functions of Revisioning module

Code

function revisioning_user_access_all($permissions, $account = NULL) {
  foreach ($permissions as $permission) {
    if (!user_access($permission, $account)) {
      return FALSE;
    }
  }
  return TRUE;
}