[Zope3-dev] security and views

Marcus J. Ertl marcus.ertl@larp-welt.de
13 Jul 2003 14:52:23 +0200


Hi!

I have defined 3 views like this::

  <browser:page
  	name="modbar"
  	for="zopeproducts.LNForum.interfaces.ILNMessage.ILNMessage"
  	template="www/moderatorbar.pt"
  	permission="zopeproducts.LNGlobals.Moderate"
  	/>

  <browser:page
  	name="ownerbar"
  	for="zopeproducts.LNForum.interfaces.ILNMessage.ILNMessage"
  	template="www/ownerbar.pt"
  	permission="zopeproducts.LNGlobals.Edit"
  	/>

  <browser:page
  	name="userbar"
  	for="zopeproducts.LNForum.interfaces.ILNMessage.ILNMessage"
  	template="www/userbar.pt"
  	permission="zopeproducts.LNGlobals.Post"
  	/>

Each needs a different permission. I call them from inside an other page
like this::

 tal:content="structure
context/@@modbar|context/@@ownerbar|context/@@userbar|default"

In my opinion, the view, for which the user have enough rights should
show up! But this doesn't happen! But I allways get the first view! 

What's wrong with my thoughts about this!

Bye
  Marcus