Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

job_trigger_permission_check()

Description

Determine whether the current user is allowed to manually trigger background jobs.
The system must have config $offline_job_queue set to true and the user must
have 'a', 'f', 't' and 'v' permissions as well as edit access to all workflow states.

Parameters

ColumnTypeDefaultDescription
bool { :
'id';

Return

bool true if the user satisfies all required permissions and workflow access, false otherwise

Location

include/job_functions.php lines 602 to 615

Definition

 
function job_trigger_permission_check(): bool
{
    global 
$offline_job_queue$userref;

    
$all_wf_states get_workflow_states();
    
$editable_wf_states array_column(get_editable_states($userref), 'id');

    
sort($all_wf_states);
    
sort($editable_wf_states);

    
$access_to_all_wf_states = ($all_wf_states === $editable_wf_states);

    return 
$offline_job_queue && checkperm('a') && $access_to_all_wf_states && checkperm('t') && checkperm('v') && checkperm('f*');
}

This article was last updated 16th January 2026 17:35 Europe/London time based on the source file dated 16th January 2026 14:45 Europe/London time.