dreamworkAPI
Ctrl K
GitHub
libraryDocs / server / permissions

server.permissions

libraryclientmenusource

The permissions the player has granted to the current server.

Functions

server.permissions.getAllReturns all known permissions.
server.permissions.grantGrants a permission to the current server.
server.permissions.isGrantedChecks if a permission is granted to the current server.
server.permissions.revokeRevokes a permission from the current server.

#server.permissions.getAll

clientmenusource
function server.permissions.getAll(): table<string, table>

Returns all known permissions.

Returns
TypeNameDescription
table<string, table>

#server.permissions.grant

clientmenusource
function server.permissions.grant(permission: string, temporary: boolean)

Grants a permission to the current server.

Parameters
NameTypeDescription
permissionstring
temporaryboolean

#server.permissions.isGranted

clientmenusource
function server.permissions.isGranted(permission: string): boolean

Checks if a permission is granted to the current server.

Parameters
NameTypeDescription
permissionstring
Returns
TypeNameDescription
boolean

#server.permissions.revoke

clientmenusource
function server.permissions.revoke(permission: string, address: string)

Revokes a permission from the current server.

Parameters
NameTypeDescription
permissionstring
addressstring
Generated from the dreamwork meta branch.