AclGroupRemoveACL: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ <!-- Describe in plain english what this function does. Don't go into details, just give an overview --> This fake function is for use with blah & blah and does blahblahblabhalb...) |
Qwe7769611 (talk | contribs) No edit summary |
||
(16 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | |||
This function removes the given ACL from the given ACL group. | |||
{{Note|The resource that's using this function needs the right to remove an acl.}} | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool aclGroupRemoveACL ( aclgroup | bool aclGroupRemoveACL ( aclgroup theGroup, acl theACL ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[aclgroup]]:removeACL||}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theGroup:''' The group to remove the given ACL from | |||
*''' | *'''theACL:''' The ACL to remove from the given group | ||
*''' | |||
===Returns=== | ===Returns=== | ||
Returns ''true'' if the ACL was successfully removed from the ACL group, ''false''/''nil'' if it could not be removed for some reason, ie. either of the elements were invalid. | |||
Returns ''true'' if | |||
==Example== | ==Example== | ||
This example outputs to the console if the Admin acl was removed from the Moderator ACL Group. (TESTED!) | |||
This example | <syntaxhighlight lang="lua">addEventHandler("onResourceStart",resourceRoot,function() | ||
if(aclGroupRemoveACL(aclGetGroup("Moderator"),aclGet("Admin")))then | |||
<syntaxhighlight lang="lua"> | aclSave() | ||
-- | outputConsole("The Admin acl was removed from the Moderator group.")-- If it was successfully removed | ||
else | |||
outputConsole("Unsuccessful... Admin might have been removed from the Moderator group before.")-- if it was removed before or didn't existed | |||
end | |||
end) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{ACL_functions}} | {{ACL_functions}} | ||
[[ | [[zh-cn:aclGroupRemoveACL]] |
Latest revision as of 08:35, 5 February 2021
This function removes the given ACL from the given ACL group.
Syntax
bool aclGroupRemoveACL ( aclgroup theGroup, acl theACL )
OOP Syntax Help! I don't understand this!
- Method: aclgroup:removeACL(...)
Required Arguments
- theGroup: The group to remove the given ACL from
- theACL: The ACL to remove from the given group
Returns
Returns true if the ACL was successfully removed from the ACL group, false/nil if it could not be removed for some reason, ie. either of the elements were invalid.
Example
This example outputs to the console if the Admin acl was removed from the Moderator ACL Group. (TESTED!)
addEventHandler("onResourceStart",resourceRoot,function() if(aclGroupRemoveACL(aclGetGroup("Moderator"),aclGet("Admin")))then aclSave() outputConsole("The Admin acl was removed from the Moderator group.")-- If it was successfully removed else outputConsole("Unsuccessful... Admin might have been removed from the Moderator group before.")-- if it was removed before or didn't existed 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