ZH-CN/aclGroupAddACL: Difference between revisions
Jump to navigation
Jump to search
Qwe7769611 (talk | contribs) No edit summary |
mNo edit summary |
||
Line 37: | Line 37: | ||
<!-- 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}} | ||
[[en:aclGroupAddACL]] | |||
[[ar:aclGroupAddACL]] | |||
[[en:AclGroupAddACL]] | |||
[[zh-cn:aclGroupAddACL]] |
Latest revision as of 18:28, 21 February 2021
此函数用于将给定ACL添加到给定ACL组。这使得给定ACL组中的资源和玩家可以访问给定ACL中指定的内容.一个组中不同ACL中的某个内容的权限被合并在一起,这意味着如果一个ACL允许访问某个内容,那么这个ACL组将有权访问该内容.
语法
bool aclGroupAddACL ( aclgroup theGroup, acl theACL )
OOP 语法 什么是OOP?
- 方法: aclgroup:addACL(...)
必填参数
- theGroup: 要将ACL添加到的组
- theACL: 要添加到组的ACL
返回值
如果ACL可以成功添加到ACL组,则返回“true”;如果其中任何一个元素无效,则返回“false”/“nil”;如果ACL已在该组中,或出现其他错误,则返回“true”.
示例
此示例添加了一个命令“addAclGroup”,使用该命令可以轻松地将新的访问控制列表添加到指定的acl组.
function addAclGroup ( thePlayer, commandName, aclName ) if(aclName) then acl = aclCreate ( aclName ) else acl = aclCreate("myName") end aclGroup = aclGetGroup("Admin") aclGroupAddACL(aclGroup,acl) -- 现在所有的管理员都有acl的权限了 aclSave () addCommandHandler ( "addAclGroup", addAclGroup)
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