Author: andrew.plotnikov
Date: 2012-03-19 10:12:24 -0400 (Mon, 19 Mar 2012)
New Revision: 5897
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml
Log:
JCR-1716: Revert to revision 5895
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml
===================================================================
---
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml 2012-03-19
13:21:25 UTC (rev 5896)
+++
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml 2012-03-19
14:12:24 UTC (rev 5897)
@@ -43,10 +43,10 @@
<section>
<title>Access Context Action</title>
- <para>SetAccessControlContextAction implements Action and may be called by
+ <para>SetAccessContextAction 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
- SetAccessControlContextAction calls the
+ SetAccessContextAction 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.access.SetAccessControlContextAction</string></field>
+ <field
name="actionClassName"><string>org.exoplatform.services.jcr.ext.SetAccessContextAction</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, user</emphasis>
and some
+ current <emphasis role="bold">item, event type,
userID</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
- SetAccessControlContextAction should be configured in the way mentioned in
+ SetAccessContextAction 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,
- DecisionMakingService someService) throws RepositoryException,
RepositoryConfigurationException {
- super(config, wsConfig);
+ OrganizationService orgService, DecisionMakingService someService) throws
RepositoryException {
+ super(config, wsConfig, orgService);
this.property =
wsConfig.getAccessManager().getParameterValue("someParam");
- this.theService = someService;
+ this.theService = someService;
}
@Override
- public boolean hasPermission(AccessControlList acl, String[] permission, Identity user)
{
+ public boolean hasPermission(AccessControlList acl, String[] permission, String userId)
{
// call the default permission check
- if (super.hasPermission(acl, permission, user)) {
+ if (super.hasPermission(acl, permission, userId)) {
Item curItem = context().getCurrentItem();
int eventType = context().getEventType();
ExoContainer container = context().getContainer();
- // call some service's method
- return theService.makeDecision(curItem, eventType, user, property);
+// call some service's method
+ return theService.makeDecision(curItem, eventType, userId, property);
} else {
return false;
}
Show replies by date