Better adapted to manage authorisation.
authorBruno Sinou <bsinou@argeo.org>
Mon, 27 Apr 2015 14:17:20 +0000 (14:17 +0000)
committerBruno Sinou <bsinou@argeo.org>
Mon, 27 Apr 2015 14:17:20 +0000 (14:17 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@8076 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

org.argeo.cms/src/org/argeo/cms/viewers/JcrVersionCmsEditable.java

index 06d90e5508ee92ec729b4bfd204b47e45c2e2d4b..2d7daae594905c19bc05e408e9d1273dc9b6577e 100644 (file)
@@ -25,15 +25,9 @@ public class JcrVersionCmsEditable extends Observable implements CmsEditable {
 
        public JcrVersionCmsEditable(Node node) throws RepositoryException {
                this.nodePath = node.getPath();
-               // Changed by BS: better adapted to manage authorisation.
-               // This permission enables property modification and addition of
-               // children nodes and corresponds to a JCR_ALL privileges given on the
-               // current node path nodes, whereas ACTION_ADD_NODE seems to be
-               // necessary to add nodes on the parent node
                if (node.getSession().hasPermission(node.getPath(),
                                Session.ACTION_SET_PROPERTY)) {
-                       // if (node.getSession().hasPermission(node.getPath(),
-                       // Session.ACTION_ADD_NODE)) {
+                       // was Session.ACTION_ADD_NODE
                        canEdit = true;
                        if (!node.isNodeType(NodeType.MIX_VERSIONABLE)) {
                                node.addMixin(NodeType.MIX_VERSIONABLE);