function state_flow_schedule_guard_permission in State Machine 7.3
Same name and namespace in other branches
- 7.2 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: The event to check.
string $permission: The permission to check.
Return value
bool TRUE if the user has access.
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 147 - 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;
}