updateResourceACLRequest
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function changes the access for one ACL request of the given resource.
Note
This function is protected by default and must be explicitly allowed in the server ACL.
Syntax
bool updateResourceACLRequest ( resource theResource, string rightName, bool access, [ string byWho = "" ] )Required Arguments
- theResource: the resource to set the ACL request for.
- rightName: a string with the name of the right to set the access for. This has to match an existing ACL request.
- access: a boolean value setting the access. True is for allow, and false for deny.
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- byWho (default: ""): a string value to identity who is changing the setting.
Returns
- bool: value
Returns true if the setting was changed, or false if no change was required or there was a problem with the arguments.
Code Examples
shared
This function will allow all ACL requests from 'theResource'
function allowAllACLRequests(theResource) local requests = getResourceACLRequests (theResource) for _,request in ipairs(requests) do updateResourceACLRequest ( theResource, request.name, true ) endendSee Also
Resource Functions
- abortRemoteRequest
- addResourceConfig
- addResourceMap
- call
- callRemote
- copyResource
- createResource
- deleteResource
- fetchRemote
- getRemoteRequestInfo
- getRemoteRequests
- getResourceACLRequests
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceGUIElement
- getResourceInfo
- getResourceLastStartTime
- getResourceLoadFailureReason
- getResourceLoadTime
- getResourceMapRootElement
- getResourceName
- getResourceOrganizationalPath
- getResourceRootElement
- getResources
- getResourceState
- getThisResource
- isResourceArchived
- isResourceProtected
- refreshResources
- removeResourceFile
- renameResource
- restartResource
- setResourceInfo
- startResource
- stopResource
- updateResourceACLRequest