P2P Service Access Control List
When you have connected to a realm, and have a reference to an nRealmNode object (see
nRealmNode), and an nServiceNode (see
nServiceNode (P2P Services)) that corresponds to a p2p service, you can access the node's acl object. This object contains a list of nServiceACLEntry objects that represent a subject and a set permissions for various operations on a p2p service.
You can also, add, delete and modify acl entry objects. To obtain the queue acl object, simply call the following method from a realm node:
Java, C#:
nServiceNode service = realm.findNode("Universal Messaging-shell");
nACL acl = service.getACLs();
C++:
nServiceNode* service = realm->findNode("Universal Messaging-shell");
nACL* acl = service->getACLs();
Once you have the acl object, you can then add, remove or modify acl entries:
nServiceACLEntry
To find a specific acl entry from the service acl, you can search the acl using the subject. For example, if I wished to change the default permissions for the *@* subject (i.e. the default permission for the service), I could use the following code:
Java, C#:
nServiceACLEntry entry = acl.find("Everyone");
entry.setFullPrivileges(false);
acl.replace(entry);
service.setACLs(acl);
C++
nServiceACLEntry* entry = acl->find("Everyone");
entry->setFullPrivileges(false);
acl->replace(entry);
service->setACLs(acl);
which would set the full privileges flag to false for the default subject.
For more information on Universal Messaging Administration, please see the API documentation, and the Enterprise Manager Guide.