Monday, October 13, 2008

Why does user.hasRole('Manager') always return True?

I wouldn't know, but this may be a clue.

Bottom line: If you want to check for a user's roles from TAL, use "user.has_role()", not "user.hasRole()".

Example:
user.has_role(['Owner','Editor',], context)
checks for roles on current context.

No comments: