BlAclPolicy - applyAclTemplate
BlAclPolicy - applyAclTemplate
Description :
This command applies an ACL template to the ACL controlling access to an ACL policy.
When an ACL template is applied to an object, all permission entries from the ACL template that are relevant to that target object are retrieved from the ACL template. Then, any entries with the role "Current Role" are replaced with the role that is executing the command. These entries are then either appended to the existing ACL entries, or they replace the existing ACL entries, depending on the value of the 'replace' argument. Returns the DBKey of the modified object.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
name | String | Name of the ACL policy to be modified. |
templateName | String | Name of the ACL template to use. |
replace | Boolean | A flag indicating whether you want to to replace all the existing ACL entries with the entries in the template. Set this flag to True if you want to replace the existing entries with the entries in the template. Set this flag to False if you want to append the entries in the template to the existing entries. |
Example
The following example shows how to apply an ACL template called "Test Template" to the ACL policy "Test Policy".
Assuming "Test Template" has the following entries in its template:
- RoleA Server.Read
- RoleA ACLPolicy.*
And that "Test Policy" has the following entries in its ACL:
- Everyone ACLPolicy.Read
- RoleA ACLPolicy.ModifyACL
Script
BlAclPolicy applyAclTemplate "Test Policy" "Test Template" true
would result in the ACL for "Test Policy" having only the entry: RoleA ACLPolicy.*
BlAclPolicy applyAclTemplate "Test Policy" "Test Template false
would result in the ACL for "Test Policy" having the entries: RoleA ACLTemplate.* Everyone ACLTemplate.Read RoleA ACLTemplate.ModifyACL