Skip to main content

ResolvePermission

Shared
boolean, string|nil Lyn.Role.ResolvePermission(string role_name, string permission)Function

Description

Like HasPermission, but also tells you which role in the inheritance chain decided the result.

Params

  1. string role_name
  2. string permission

Returns

  1. Whether the permission is granted.
  2. The role that defined it.

Example:

local has, from = Lyn.Role.ResolvePermission("moderator", "kick")
-- has = true, from = "admin" (inherited)