Author: andrew.plotnikov
Date: 2012-03-19 09:15:41 -0400 (Mon, 19 Mar 2012)
New Revision: 5894
Added:
jcr/branches/1.12.x/patch/1.12.13-GA/JCR-1716/
jcr/branches/1.12.x/patch/1.12.13-GA/JCR-1716/JCR-1716.patch
Log:
JCR-1716: patch proposed
Added: jcr/branches/1.12.x/patch/1.12.13-GA/JCR-1716/JCR-1716.patch
===================================================================
--- jcr/branches/1.12.x/patch/1.12.13-GA/JCR-1716/JCR-1716.patch
(rev 0)
+++ jcr/branches/1.12.x/patch/1.12.13-GA/JCR-1716/JCR-1716.patch 2012-03-19 13:15:41 UTC
(rev 5894)
@@ -0,0 +1,71 @@
+Index:
exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml
+===================================================================
+---
exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml (revision
5891)
++++
exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/other/acl-ext.xml (working
copy)
+@@ -47,10 +47,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>
+
+@@ -60,7 +60,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>
+@@ -128,11 +128,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>public class CustomAccessManagerImpl extends AccessManager {
+@@ -141,23 +141,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;
+ }
Show replies by date