AclListRights: Difference between revisions
Jump to navigation
Jump to search
Qwe7769611 (talk | contribs) No edit summary |
|||
(4 intermediate revisions by 4 users not shown) | |||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
table aclListRights ( acl theACL ) | table aclListRights ( acl theACL, string allowedType ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[acl]]:listRights||}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theACL:''' The ACL to get the rights from | *'''theACL:''' The ACL to get the rights from | ||
*'''allowedType:''' The allowed right type. Possible values are ''general'', ''function'', ''resource'' and ''command'' | |||
===Returns=== | ===Returns=== | ||
Line 34: | Line 35: | ||
<!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --> | <!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --> | ||
{{ACL_functions}} | {{ACL_functions}} | ||
[[zh-cn:aclListRights]] |
Latest revision as of 08:36, 5 February 2021
This function returns a table of all the rights that a given ACL has.
Syntax
table aclListRights ( acl theACL, string allowedType )
OOP Syntax Help! I don't understand this!
- Method: acl:listRights(...)
Required Arguments
- theACL: The ACL to get the rights from
- allowedType: The allowed right type. Possible values are general, function, resource and command
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.
Example
This example outputs the rights of the given acl. (TESTED!)
addCommandHandler("aclRights",function(player,command,theAcl) if(theAcl~="")then rights = aclListRights(aclGet(theAcl)) count = 0 for acl,list in pairs(rights)do outputChatBox("ACL List: "..theAcl.." #"..tostring(count).." Right: "..list..".",player) count = count + 1 end else outputChatBox("Please type in a acl that you want to retrieve the rights from.",player) outputChatBox("Please use this Syntax: /aclRights theACL ",player) end end)
See Also
- aclCreate
- aclCreateGroup
- aclDestroy
- aclDestroyGroup
- aclGet
- aclGetGroup
- aclGetName
- aclGetRight
- aclGroupAddACL
- aclGroupAddObject
- aclGroupGetName
- aclGroupList
- aclGroupListACL
- aclGroupListObjects
- aclGroupRemoveACL
- aclGroupRemoveObject
- aclList
- aclListRights
- aclReload
- aclRemoveRight
- aclSave
- aclSetRight
- hasObjectPermissionTo
- isObjectInACLGroup