AccessControlAdmin accessControlAdmin = registryRealm.getAccessControlAdmin();
accessControlAdmin.authorizeUser(userName, path, action);
accessControlAdmin.authorizeRole(roleName, path, action);
Similarly, you can deny a user or role from performing one or more operations on a particular
resource or collection. Authorizing and denying are mutually exclusive operations.
AccessControlAdmin accessControlAdmin = registryRealm.getAccessControlAdmin();
accessControlAdmin.denyUser(userName, path, action);
accessControlAdmin.denyRole(roleName, path, action);
The path can be the path of any valid resource or collection on the registry, whilst the action can be one of get, put, delete and authorize. Each of these have corresponding constants (ex:- ActionConstants.GET).
You can also copy authorizations from one path to another.
registryRealm.getAccessControlAdmin().copyAuthorizations(sourcePath, targetPath);
The registry treats each and every user and role in a similar manner at runtime, except for a few special users and roles. The system user is responsible for the operations done on the registry by the server itself. The admin user is a special user having all privileges for performing registry operations. The everyone role represents any valid user.