aclListRights
Client-side
Server-side
Shared
OOP Syntax Help! I don't understand this!
- Method:acl:listRights(...)
Syntax
table|false aclListRights ( acl theAcl, [ string allowedType = nil ] )Required arguments
- theAcl: The ACL to get the rights from.
Optional arguments
Note: when using optional arguments, you might need to supply all arguments before the one you wish to use.
- allowedType (default: nil): The allowed right type. Possible values are
general,function,resourceandcommand. If not specified, all types will be retrieved.
Returns
Returns a table over the rights as strings in the given ACL. This table might be empty. Returns false or nil if theACL is invalid or it fails for some other reason.
- table|false: acl rights list
Code Examples
server
This example outputs the rights of the given acl.
addCommandHandler("aclRights",function(player,command,theAcl) if (not theAcl) then -- Was the ACL provided? outputChatBox("No ACL name was provided.", player, 255, 255, 255) return end
local acl = aclGet(theAcl) if (acl) then -- Does an ACL with that name exist? local rights = aclListRights(acl) outputChatBox("List of rights of ACL "..theAcl.." (#"..#rights.."): ", player, 255, 255, 255) for k,v in ipairs(rights) do outputChatBox("- "..v, player) end else outputChatBox("ACL "..theAcl.." does not exist", player, 255, 255, 255) endend)See Also
ACL Functions
- aclCreate
- aclCreateGroup
- aclDestroy
- aclDestroyGroup
- aclGet
- aclGetGroup
- aclGetName
- aclGetRight
- aclGroupAddACL
- aclGroupAddObject
- aclGroupGetName
- aclGroupList
- aclGroupListACL
- aclGroupListObjects
- aclGroupRemoveACL
- aclGroupRemoveObject
- aclList
- aclListRights
- aclObjectGetGroupsNew
- aclReload
- aclRemoveRight
- aclSave
- aclSetRight
- hasObjectPermissionTo
- isObjectInACLGroup