[exo-jcr-commits] exo-jcr SVN: r5891 - jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Mar 19 08:42:52 EDT 2012
Author: andrew.plotnikov
Date: 2012-03-19 08:42:51 -0400 (Mon, 19 Mar 2012)
New Revision: 5891
Modified:
jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml
Log:
JCR-1716: fixed errors in doc about Access Manager
Modified: jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml 2012-03-19 12:06:10 UTC (rev 5890)
+++ jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml 2012-03-19 12:42:51 UTC (rev 5891)
@@ -43,10 +43,10 @@
<section>
<title>Access Context Action</title>
- <para>SetAccessContextAction implements Action and may be called by
+ <para>SetAccessControlContextAction implements Action and may be called by
SessionActionInterceptor as a reaction of some events - usually before
writing methods and after reading (getNode(), getProperty() etc). This
- SetAccessContextAction calls the
+ SetAccessControlContextAction calls the
AccessManager.setContext(InvocationContext context) method which sets the
ThreadLocal invocation context for the current call.</para>
@@ -56,7 +56,7 @@
<object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
<field name="eventTypes"><string>addNode,read</string></field>
<field name="workspace"><string>production</string></field >
- <field name="actionClassName"><string>org.exoplatform.services.jcr.ext.SetAccessContextAction</string></field>
+ <field name="actionClassName"><string>org.exoplatform.services.jcr.ext.access.SetAccessControlContextAction</string></field>
</object>
</value></programlisting>
</section>
@@ -124,11 +124,11 @@
<para>The sample CustomAccessManagerImpl below extends the default access
manager and uses some DecisionMakingService in the overloaded
hasPermission method to find out if a current user has permission to use
- current <emphasis role="bold">item, event type, userID</emphasis> and some
+ current <emphasis role="bold">item, event type, user</emphasis> and some
parameter of AccessManager. To make this Access manager work, it is
necessary to configure it in jcr configuration as mentioned in <emphasis
role="bold">Custom Extended Access Manager</emphasis> and
- SetAccessContextAction should be configured in the way mentioned in
+ SetAccessControlContextAction should be configured in the way mentioned in
<emphasis role="bold">Access Context Action.</emphasis></para>
<programlisting language="java">public class CustomAccessManagerImpl extends AccessManager {
@@ -137,23 +137,23 @@
private DecisionMakingService theService;
public CustomAccessManagerImpl (RepositoryEntry config, WorkspaceEntry wsConfig,
- OrganizationService orgService, DecisionMakingService someService) throws RepositoryException {
- super(config, wsConfig, orgService);
+ DecisionMakingService someService) throws RepositoryException, RepositoryConfigurationException {
+ super(config, wsConfig);
this.property = wsConfig.getAccessManager().getParameterValue("someParam");
- this.theService = someService;
+ this.theService = someService;
}
@Override
- public boolean hasPermission(AccessControlList acl, String[] permission, String userId) {
+ public boolean hasPermission(AccessControlList acl, String[] permission, Identity user) {
// call the default permission check
- if (super.hasPermission(acl, permission, userId)) {
+ if (super.hasPermission(acl, permission, user)) {
Item curItem = context().getCurrentItem();
int eventType = context().getEventType();
ExoContainer container = context().getContainer();
-// call some service's method
- return theService.makeDecision(curItem, eventType, userId, property);
+ // call some service's method
+ return theService.makeDecision(curItem, eventType, user, property);
} else {
return false;
}
More information about the exo-jcr-commits
mailing list