[Zope] hasRole vs. has_role

Ulrich Wisser Ulrich Wisser <u.wisser@publisher.de>
Fri, 17 May 2002 13:24:06 +0200


Hello,

I ran into some problems with these two methods. What is the
difference between them?

Here my problem:
User has role 'PLAYER' but *not* 'MODERATOR'

  <dtml-unless "_.SecurityGetUser().has_role('MODERATOR')">
    Has role MODERATOR
  </dtml-unless>

doesn't print. Which is what I exspected. But

  <dtml-unless "_.SecurityGetUser().hasRole('MODERATOR')">
    Has role MODERATOR
  </dtml-unless>

does print the message. Why?

Regards

Ulrich

-- 
Searchengine Know How  - Webpromotion - Optimization - Internal Search
World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg
http://www.publisher.de   Tel: +46-8-53460905    Fax: +46-8-534 609 06