Saturn has a built-in permissions system, it's designed to work with the Control Panel plugin, but will work for any other control-panel-esque as well.
Check if the user has a certain permission.
useSaturn\AccountManager\Permissions;$Permissions =newPermissions($_SESSION['uuid']);if ($Permissions->HasPermission(['administrator','panel_access'],'OR')) {// User is an administrator, or has the panel_access permission.} else {// User is not an administrator.// They also don't have the panel_access permission.}
Fetch a list of the user's permissions.
useSaturn\AccountManager\Permissions;$Permissions =newPermissions($_SESSION['uuid']);// All the user's permissions in JSON object format.$UserPermissions = $Permissions->Permissions;