Locked & classified visibility
Two fields control who can see a logbook entry:locked— an array of role ids allowed to unlock the entry.classified— an array of role ids allowed to view a classified entry.
{}) means no restriction. You provide these role ids when
creating an entry, and
getLogbookEntries returns them back as arrays.
Legacy entries created before role-scoped visibility stored a plain boolean.
When such an entry is read, its
locked / classified value is returned as
the single-element array { "legacy_role" } instead of a boolean.Lock and Classify are Enterprise items and should not be used in the lower tiers.
Entry types
Thetype you pass to createLogbookEntry determines the
entry’s behaviour. Built-in types:
Your organization may also define custom log types in the dashboard. Pass
their configured id as
type. Rank-related and duration behaviour follows the
custom type’s configuration.createLogbookEntry
Creates a new logbook entry (warning, ban, mute, rank lock, etc.) for a user.Parameters
Player | table | number
required
Who is issuing the entry. See the actor object.
Player | number | string
required
The user receiving the entry. Accepts a
Player instance or a raw UserId.table
required
Entry options.
Returns
table | nil
The created entry on success, or
nil if the request was rejected or the
backend was unreachable.Examples
revertLogbookEntry
Reverts a logbook entry by id, undoing its effects: rank-changing entries (suspensions, demotions, promotions, and custom rank actions) rank the user back, machine bans are lifted, and comment / verbal warning / SHR note entries are deleted outright. Every other type is marked reverted and kept on record.Batchable as the
logbook.revert op with args { userId, id, reason } — see
apiBatch.Parameters
Player | table | number
required
Who is reverting the entry. See the actor object.
For rank-reverting entries the actor must outrank the rank being restored.
Player | number | string
required
The user the entry belongs to. Accepts a
Player instance or a raw UserId.table
required
Revert options.
Returns
table | nil
The revert result, or
nil if the request was rejected (entry not found,
already reverted, locked, insufficient rank, etc.) or the backend was
unreachable.Example
getLogbookEntries
Fetches a user’s logbook entries, optionally filtered by type and active state.Batchable as the
logbook.getEntries op with args
{ userId, type, active } — see apiBatch.
The op result is { entries = {...} }.Parameters
number | string
required
The
UserId whose entries to fetch.table
Optional filters.
Returns
object[]
An array of logbook entries. Empty if none match or the request failed.
Example
checkranklock
Convenience check for whether a user currently has an active rank lock (rlock) entry. Equivalent to calling getLogbookEntries
with type = "rlock" and active = true and testing for results.
Batchable as the
logbook.checkRankLock op with args { userId } — see
apiBatch. The op result is
{ locked = boolean }.Parameters
number | string
required
The
UserId to check.Returns
boolean
true if the user has at least one active rank lock, otherwise false.
