Hi,
There is not a specific API. So we had to use the internal API of JBoss Portal to do so.
Here is an extract
Jean-Sébastien
// Get the page
PortalObject page = getControllerContext().getController().getPortalObjectContainer().getObject(poid);
// Get the DomainConfigurator
DomainConfigurator dc = getControllerContext().getController().getPortalObjectContainer()
.getAuthorizationDomain().getConfigurator();
// Construct the permission
Set<RoleSecurityBinding> newConstraints = new HashSet<RoleSecurityBinding>();
Set<String> secureAction = new HashSet<String>();
secureAction.add(PortalObjectPermission.VIEW_ACTION);
newConstraints.add(new RoleSecurityBinding(secureAction, "myRole"));
// Set the permission
dc.setSecurityBindings(page.getId().toString(PortalObjectPath.CANONICAL_FORMAT), newConstraints);