Creating a Custom Policy
Custom policies can be created as a supplement to the system policies of RES. For the actions that can be added to custom policies, see Permissions Policies and Supported Actions.
You can create custom policies in either of the following ways:
- Visual editor: Select cloud services, actions, resources, and request conditions.
- JSON: Edit JSON policies from scratch or based on an existing policy.
For details, see Creating a Custom Policy. The following section contains examples of common RES custom policies.
Example Custom Policies
- Example 1: Denying job deletion
A deny policy must be used in conjunction with other policies to take effect. If the permissions assigned to a user contain both "Allow" and "Deny", the "Deny" permissions take precedence over the "Allow" permissions.
If you need to grant a user the RES FullAccess policy but forbid the user from deleting jobs, create a custom policy for denying job deletion, and grant both policies to the user. The user can then perform all operations on RES except job deletion. The following is an example of a deny policy:
{ "Version": "1.1", "Statement": [ { "Action": [ "res:job:delete" ], "Effect": "Deny" } } - Example 2: Multiple policies are granted, allowing you to view the job list and job details.
{ "Version": "1.1", "Statement": [ { "Effect": "Allow", "Action": [ "res:job:get" , "res:job:list" ] } ] }
Last Article: Creating a User and Granting Permissions
Next Article: User Guide (Old)
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.