Skip to main content

Function: isUserAuthorized()

function isUserAuthorized(
uid,
method,
action): boolean;

Defined in: permissions.ts:20

Checks if a user is authorized for a specific action, such as "room_create" or "room_kick". This function uses the ADMIN_LIST environment variable that contains a list of authorized credentials based on a UID and the login method.

Parameters

ParameterTypeDescription
uidstringThe user UID performing the action
methodstringHow the user logged into SME Connect (i.e. google, apple, CAC)
actionstringAction the user is trying to make: "room_create" or "room_kick"

Returns

boolean

Boolean indicating if the user is authorized to perform the set action.