Re: [web2py] How would I do something like this?

2012-04-30 Thread Bill Barry
On Mon, Apr 30, 2012 at 8:18 PM, Bruce Wade bruce.w...@gmail.com wrote:
 @auth.requires_membership('Analytics' or 'Analytics Manager')
 def index():
     return dict(message=hello from analytics.py)

I am a bit new to this, but my understanding is that this is what you want.

@auth.requires(auth.has_membership('Analytics') and
auth.has_membership('Analytics Manager'))

Bill


Re: [web2py] How would I do something like this?

2012-04-30 Thread Bill Barry
On Mon, Apr 30, 2012 at 9:36 PM, Bill Barry b...@billbarry.org wrote:
 On Mon, Apr 30, 2012 at 8:18 PM, Bruce Wade bruce.w...@gmail.com wrote:
 @auth.requires_membership('Analytics' or 'Analytics Manager')
 def index():
     return dict(message=hello from analytics.py)

 I am a bit new to this, but my understanding is that this is what you want.

 @auth.requires(auth.has_membership('Analytics') and
 auth.has_membership('Analytics Manager'))

 Bill

Or more probably
@auth.requires(auth.has_membership('Analytics') or
auth.has_membership('Analytics Manager'))

Bill