Hi
You will find the code in
info.magnolia.cms.gui.control.Tree.getHtmlChildrenOfOneType(). I don't know why, but the data is provided in hidden fields to the client:

html.append(new Hidden(idPre + "_PermissionWrite", Boolean.toString(permissionWrite), false).getHtml()); / html.append(new Hidden(idPre + "_ItemType", itemType, false).getHtml()); //$NON-NLS-1$ html.append(new Hidden(idPre + "_IsActivated", Boolean.toString(isActivated), false).getHtml()); //$NON-NLS-1$

Hope this helps

Philipp Bracher

>
>The context menu items are faded with the help of javascript triggers, e.g. 
> see AdminTreeWebsite.prepareContextMenu(Tree, HttpServletRequest):
>
>        menuOpen.addJavascriptCondition("new mgnlTreeMenuItemConditionSelectedNotRoot(" //$NON-NLS-1$
>            + tree.getJavascriptTree() + ")"); //$NON-NLS-1$
>
>The 'open page' context menu item only is active, if it is not the root node. There are a >bunch of predefined javascript conditions in /admindocroot/js/contextmenu.js
 
I understand this, and I am able to add logic in the AdminTreeWebsite class to apply my permissions check to disable context menu items if the user is not in the "cmsPublisher" role.  This is not very granular however.  This means that a 'publisher' is granted publish rights to ALL content for which they have write privileges.  Also, it means that in order to be a publisher, you MUST also be able to edit the content.  I want to implement a more granular and flexible solution in which permissions are applied at the tree node level just like the other permission sets (read, write, deny).  What I am having difficulty finding is where in the source code the permissions are evaluated for adding these Javascript conditions.
 
Any insight into how this handled?
 
-KG
 

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to