Browse docs

Training

Server-side access checks for integrations that accompany the Jobs Base Training App.

Supported server integration boundary

Training catalogue and record mutations are intentionally kept inside the server-authoritative app workflow. External server resources can verify the same Boss Menu permissions and tablet restriction used by the app before exposing related functionality.

hasJobPermission(playerId, permission, jobName?)

Checks the actor's current grade permission, including the global ALL permission.

server.lua
local canViewTrainingRecords = exports["sky_jobs_base"]:hasJobPermission(
    source,
    1003, -- Config.Training.permissions.viewRecords by default
    "police"
)
ArgumentTypeDescription
playerIdnumberOnline player source whose authoritative job and grade are checked
permissionnumber | stringTraining permission ID or a standard Jobs Base permission key
jobNamestring?Optional exact job requirement

Returns: boolean

isTabletAppRestrictedForPlayer(playerId, appKey)

Checks the Boss Menu tablet-app restriction for a player grade.

server.lua
local hidden = exports["sky_jobs_base"]:isTabletAppRestrictedForPlayer(source, "training")
if hidden then
    return
end

Returns: boolean

No public Training mutation export

Course, session, enrollment, result, qualification, and audit mutations are not public exports. This keeps identity resolution, state transitions, cooldowns, permissions, and database transactions on one canonical path.

Server exports cannot be called directly by a FiveM client, but an integrating server resource must still validate any client-facing event before it calls an export. Never treat a source, job, identifier, grade, or permission supplied in a client payload as trusted.