You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Eric Brun (JIRA)" <ji...@apache.org> on 2011/03/30 18:41:05 UTC
[jira] [Created] (JCRRMI-31) ClientAccessControl is not
Implementated yet
ClientAccessControl is not Implementated yet
--------------------------------------------
Key: JCRRMI-31
URL: https://issues.apache.org/jira/browse/JCRRMI-31
Project: Jackrabbit JCR-RMI
Issue Type: Bug
Affects Versions: 2.1.0
Environment: Jackrabbit 2.2.4 + RMI server enable
Reporter: Eric Brun
When I try to deal with Access Control feature of Jackrabbit throw RMI connection, I have the following error :
javax.jcr.UnsupportedRepositoryOperationException: addAccessControlEntry
at org.apache.jackrabbit.rmi.client.security.ClientAccessControlList.addAccessControlEntry(ClientAccessControlList.java:59)
My client rmi program :
private void setPerm(final String login, Node node, String priv ){
try {
Session session = node.getSession();
AccessControlManager acm = session.getAccessControlManager();
AccessControlPolicyIterator it =
acm.getApplicablePolicies(node.getPath());
System.out.println(it.getSize());
while ( it.hasNext()){
AccessControlPolicy policy = it.nextAccessControlPolicy();
System.out.println("Echo " + policy.getClass().getCanonicalName());
Privilege[] privileges = new Privilege[1];
privileges[0] = acm.privilegeFromName(priv);
Principal p = new Principal(){
@Override
public String getName() {
System.out.println("Echo " + login);
return login;
}
};
((AccessControlList)policy).addAccessControlEntry(p,
privileges);
acm.setPolicy(node.getPath(), policy);
}
} catch (RepositoryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira