You are here

function state_flow_schedule_guard_permission in State Machine 7.2

Same name and namespace in other branches
  1. 7.3 modules/state_flow_schedule/state_flow_schedule.module \state_flow_schedule_guard_permission()

Helper to determine user_access by event and permission

Parameters

string $event:

string $permission:

Return value

bool

1 call to state_flow_schedule_guard_permission()
state_flow_guard_schedule in modules/state_flow/state_flow.module
Guard condition callback

File

modules/state_flow_schedule/state_flow_schedule.module, line 91
Module file for state_flow_schedule.

Code

function state_flow_schedule_guard_permission($event, $permission) {

  // If the user has the global permission, then return TRUE
  if (user_access($permission)) {
    return TRUE;
  }

  // Otherwise, return FALSE
  return FALSE;
}