Skip to content

Commit

Permalink
Add to docs that a reason is given for hasPermission (#1680)
Browse files Browse the repository at this point in the history
  • Loading branch information
thegrb93 authored Mar 23, 2024
1 parent 6db8dd8 commit d5ab740
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/starfall/libs_sh/builtins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ end
-- @param string perm The permission id to check
-- @param any obj Optional object to pass to the permission system.
-- @return boolean Whether the client has granted the specified permission.
-- @return string The reason the permission check failed
function builtins_library.hasPermission(perm, obj)
checkluatype(perm, TYPE_STRING)
if not SF.Permissions.privileges[perm] then SF.Throw("Permission doesn't exist", 2) end
Expand Down

0 comments on commit d5ab740

Please sign in to comment.