I've created a folder in which there's a dtml method index_html which
displays a calendar of events found in the ZCatalog.

In this folder I've created several folders, one for each event type
(e.g. courses, exams, etc...)

each subfolder acquire the index_html method when it is displayed.

In each subfolder I've created a user folder and created an user who has a
manager role (I've also given the user a local role of manager for the
subfolder, but I don't now if it is useful or not): this person should be
able to add whatever she wants, especially events, in her folder, but
nowhere else. 

here's the tree:

|-- index_html
|-- Courses
|   |-- acl_users
|   |   |-- jerome (can add events in Courses only)
|   |-- event 1
|   |-- event 2
|   |-- ...
|   |-- event n
|-- Exams
    |-- acl_users
    |   |-- fred (can add events in Exams only)
    |-- event 1
    |-- ...
    |-- event n   

If I log in as superuser (Zope 2.1.6 with patches) then no problem, I can
add events wherever I want. 

If I log in as a user I've created in one of the subfolders then my test
seems to be wrong (see below).

here's my code which should create an html link to the add form if the
logged in user is a manager for the subfolder (e.g. jerome for Courses),
or just display the day number if not

  <!-- I begin to create a link to the add form if the user is -->
  <!-- a manager for the subfolder -->
  <dtml-with URL1>
    <dtml-if AUTHENTICATED_USER.has_role('manager')">
      <a href="manage_addProduct/GenericEvent/GenEvent_addForm?date=<dtml-var
date>"><dtml-var "date.dd()"></a>
      <dtml-var "date.dd()">
  <!-- Then I display all found events -->  
  <dtml-in "Catalog(...)">
    <!-- this part is ok -->


it seems just like if the <dtml-with URL1> does nothing.

Does anyone have an idea ?

thanks in advance.

Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome
Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30 
28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to