jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Köll (JIRA) <j...@apache.org>
Subject [jira] Commented: (JCR-1005) More Fine grained Permission Flags
Date Thu, 09 Aug 2007 14:23:43 GMT

    [ https://issues.apache.org/jira/browse/JCR-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518721
] 

Claus Köll commented on JCR-1005:
---------------------------------

thanks for your hints stefan
ok i see my patch was too fast. sorry that it is not complete

i also thought that there is maybe a problem with backward compatibility, but i have the problem
as described
and maybe there is a other solution ?

you say that the current flags apply to the target and not to the parent but in the SessionImpl
Method checkPermission()
there is my problem. In my scenario the user trys to add a new node (File->Save As) on
a parent node and i should now
if he try to save the original file or if he try to save the file with a other name ....

/**
 * "add_node" action:
 * requires WRITE permission on parent item
*/
if (set.contains(ADD_NODE_ACTION)) {
  try {
    parentPath = targetPath.getAncestor(1);
    parentId = hierMgr.resolvePath(parentPath);
    if (parentId == null) {
      // parent does not exist (i.e. / was specified), throw exception
      throw new AccessControlException(ADD_NODE_ACTION);
    }
    accessMgr.checkPermission(parentId, AccessManager.WRITE);
    } catch (AccessDeniedException re) {
      // otherwise the RepositoryException catch clause will
      // log a warn message, which is not appropriate in this case.
      throw new AccessControlException(ADD_NODE_ACTION);
    }
}


hope for help
claus

> More Fine grained Permission Flags
> ----------------------------------
>
>                 Key: JCR-1005
>                 URL: https://issues.apache.org/jira/browse/JCR-1005
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: security
>    Affects Versions: 1.3
>            Reporter: Claus Köll
>         Attachments: acces.patch
>
>
> It would be fine to have one more Permission Flag on node add.
> At the moment there are 3 flags. We need to know if a node will be updated or created.
> This is not possible with the current implementation because on node add the permission
flag 
> AccessManager.WRITE will be used. This is a Problem in a  WebDav Scenario with Microsoft-Word
because if i open a Node and 
> try to save it i need write permissions on the parent node. this is ok. If a user trys
to save the file with a other name
> he can because the same PermissionFlag will be used.
> Maybe there is a other solution for this problem ?
> BR,
> claus

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message