Dear Magnolians
I'm currently working on a Magnolia site where registered users can
create data module records. Their records are placed in a folder
structure just like the HierarchicalUserManager structures the user
accounts. All these folders are kept in one base folder, e.g. "/base".
The role for these users of course has read+write permission on this
folder and its subfolders.
For some strange reason however I'm getting an AccessDeniedException
when trying to create subfolders to the "/base" folder because "User
not allowed to Read path [/]". The first few lines of the stack trace
are:
at info.magnolia.cms.core.Access.isGranted(Access.java:63)
at
info.magnolia.cms.core.DefaultContent.<init>(DefaultContent.java:144)
at
info
.magnolia
.cms.core.DefaultHierarchyManager.getRoot(DefaultHierarchyManager.java:
408)
at
info.magnolia.cms.util.ContentUtil.createPath(ContentUtil.java:374)
at
ch
.fastforward
.coach.controller.CoachController.createNewNode(CoachController.java:
122)
And that line 122 in my CoachController class is:
ContentUtil.createPath(MgnlContext.getHierarchyManager("data"),
parentPath, new ItemType("dataFolder"), true);
Now why does this code try to read from "/"? I don't think it really
has to, because creating folders and data nodes in Admin Central works
perfectly find for a user that only has read+write permissions to "/
base" instead of "/"... Is this a bug? Or is it the nature of the
"createPath" method that it tries to access all parts of the path from
the root up?
Regards,
Will
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------