[Zope3-Users] permissions to edit content

mathieu gendron mathieug at immocontrole.ca
Thu Feb 10 11:41:26 EST 2005


Hi
I have been building an application based on zope3 dev book, when i set up
my security i found out that under my principals i can't edit my objects. I
have access to the edit tab in zope but when i press the change button i got
an unauthorized page.

Like the messageboard exemple i got two principal declared in the
principals.zcml, two role an add, view, edit and delete permission.
i got everything setup in a security.zcml.

other than the editform and the content class permissions, is there anything
else
needed???

thx for any help
Mathieu Gendron

here is my config file:

<configure
  xmlns:zope='http://namespaces.zope.org/zope'
  xmlns:browser='http://namespaces.zope.org/browser'
>
<zope:permission
  id="immo.permission.View87"
  title="voir produits 87"
  description="voir les dossiers et les produits de l immeuble 87."
/>
<zope:permission
  id="immo.permission.Add"
  title="ajouter produits"
  description="ajouter un produit a n importe quel produits."
/>
<zope:permission
  id="immo.permission.Edit87"
  title="modifier produits 87"
  description="modifier le contenu des dossiers ou produit."
/>
<zope:permission
  id="immo.permission.Delete"
  title="detruire produits"
  description="detruire une instance de produit d un immeuble."
/>

<!-- *********** produit Groupe ************* -->
<zope:content class=".groupes.Groupe">
  <require
    permission="immo.permission.View87"
    interface=".interfaces.IGroupe"
  />
  <require
    permission="immo.permission.View87"
    interface=".interfaces.IGroupeContainer"
  />
  <require
    permission="immo.permission.Edit87"
    set_schema=".interfaces.IGroupe"
  />
</zope:content>

<browser:containerViews
  for=".interfaces.IGroupe"
  index="immo.permission.View87"
  contents="immo.permission.Edit87"
  add="immo.permission.Add"
/>

<browser:addMenuItem
  class=".groupes.Groupe"
  title="Dossier Immo"
  permission="immo.permission.Add"
  view="AddGroupe.html"
/>
<browser:addform
  label="entrer une description"
  name="AddGroupe.html"
  schema=".interfaces.IGroupe"
  content_factory=".groupes.Groupe"
  fields="description"
  permission="immo.permission.Add"
/>

<!-- *********** produit 1_1 ************* -->
<zope:content class=".produits.P1_1">
<implements
  interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
/>
<require
  permission="immo.permission.View87"
  interface=".interfaces.I1_1"
/>
<require
  permission="immo.permission.Edit87"
  set_schema=".interfaces.I1_1"
/>
</zope:content>

<browser:page
  for=".interfaces.I1_1"
  name="index.html"
  template="1_1.pt"
  permission="immo.permission.View87"
  menu="zmi_views" title="Preview"
/>
<browser:addform
  schema=".interfaces.I1_1"
  label="Inserer le numero de id et de batisse"
  content_factory=".produits.P1_1"
  fields="id batisse"
  name="Add1_1.html"
  permission="immo.permission.Add"
/>
<browser:addMenuItem
  class="PROJET_IMMO.testProd.produits.P1_1"
  title="Produit Immo 1_1"
  description="Un produit Immo"
  permission="immo.permission.Add"
  view="Add1_1.html"
/>
<browser:editform
  name="edit.html"
  label="Editer les attributs"
  schema=".interfaces.I1_1"
  template="edit1_1.pt"
  permission="immo.permission.Edit87"
  menu="zmi_views" title="edit"
  fields="mode setpoint setpointmin
  hor_1_heure hor_1_jour
  hor_1_min hor_1_mode hor_1_sp"
/>
<include package=".browser" />
</configure>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20050210/95917acd/attachment.htm


More information about the Zope3-users mailing list