Renaud Richardet wrote:
Hello,
I would like to modify the look of the menus, and allow only users with
admin rights to be allowed to create a specific ressource type, so
that's what I tried:
In mypub/config/menu/generics.xsp, I added:
<menus>
<menu i18n:attr="name" name="File">
<block admin="false">
<item uc:usecase="site.create" wf:event="mydoctype"
href="?doctype=mydoctype"><i18n:text>New MyDoctype</i18n:text></item>
</block>
</menu>
The workflow authorization doesn't help here, because it applies to the
*current* document and not the document to be created.
Instead, you can declare a custom usecase (patch cocoon.xconf)
and use it in the menu:
<item uc:usecase="site.create.mydoctype"
href="?doctype=mydoctype"><i18n:text>New MyDoctype</i18n:text></item>
Now you can protect it in usecase-policies.xml:
<usecase id="site.create.mydoctype">
<role id="admin"/>
</usecase>
HTH,
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]