[Zope] Letting a content manager add ZClass instances

Jean Jordaan Jean@mosaicsoftware.com
Mon, 14 Aug 2000 09:07:23 +0200


Hi Zopers ..

I want content managers to be able to add and edit ZClass 
instances without having to negotiate the Zope management
interface. So I want them to visit the Add and Edit forms,
but to be redirected back to where they were browsing.

The best I could do was: in 'ccDocClass_add', the
ccDocClass constructor, check the user:

............................................................
<dtml-if DestinationURL>

  <dtml-if "AUTHENTICATED_USER.has_role('ContentManager')">
    <dtml-call "RESPONSE.redirect(
         DestinationURL+'/index_html')">
  <dtml-else>
    <dtml-call "RESPONSE.redirect(
         DestinationURL+'/manage_workspace')">
  </dtml-if>

<dtml-else>
............................................................

I gave their user both 'ContentManager' and 'Manager' roles, 
as I couldn't figure out which permissions 'ContentManager' 
needed to have. I gave it all the ones I thought obvious, but
was still being denied entrance.

Is there anything here I could do 1000 times better?

Yours,
-- 
jean