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
,resource
andcommand
. If not specified, all types will be retrieved.
Returns
- table|false: acl rights list
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.
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
- aclGetName
- aclGetRight
- aclGetGroup
- aclGroupAddACL
- aclGroupAddObject
- aclGroupGetName
- aclGroupList
- aclGroupListObjects
- aclGroupListACL
- aclGroupRemoveACL
- aclGroupRemoveObject
- aclList
- aclListRights
- aclObjectGetGroups
- aclReload
- aclRemoveRight
- aclSave
- aclSetRight
- hasObjectPermissionTo
- isObjectInACLGroup