[web2py] Re: [problem][trunk] @auth.requires

2011-03-17 Thread Massimo Di Pierro
I have reverted this behavior in 1.94.2. Massimo On Mar 17, 12:10 pm, Martín Mulone wrote: > I currently developing this application this why this problem came :P. So I > can make the proper changes. Also have to make the proper changes > tohttp://web2py.com/book/default/chapter/08#Combining-Re

[web2py] Re: [problem][trunk] @auth.requires

2011-03-17 Thread Massimo Di Pierro
Hmmm... that is in the book...I will revert the changes. Massimo On Mar 17, 12:10 pm, Martín Mulone wrote: > I currently developing this application this why this problem came :P. So I > can make the proper changes. Also have to make the proper changes > tohttp://web2py.com/book/default/chapter

Re: [web2py] Re: [problem][trunk] @auth.requires

2011-03-17 Thread Martín Mulone
I currently developing this application this why this problem came :P. So I can make the proper changes. Also have to make the proper changes to http://web2py.com/book/default/chapter/08#Combining-Requirements 2011/3/17 Massimo Di Pierro > for example > > auth.requires(request.ajax) > > you can

[web2py] Re: [problem][trunk] @auth.requires

2011-03-17 Thread Massimo Di Pierro
for example auth.requires(request.ajax) you can do @auth.requires(auth.user and (auth.has_membership(role='Admin') or \ auth.has_membership(role='Soporte') or \ auth.has_membership(role='Consulta_Soporte') or \ auth.has_membership(role='Consulta_Clien

Re: [web2py] Re: [problem][trunk] @auth.requires

2011-03-17 Thread Martín Mulone
The problem was that I remove the others conditions (to make it more basic), this is the code that brings the fail: @auth.requires(auth.has_membership(role='Admin') or \ auth.has_membership(role='Soporte') or \ auth.has_membership(role='Consulta_Soporte') or \

[web2py] Re: [problem][trunk] @auth.requires

2011-03-17 Thread Massimo Di Pierro
I considered this a bug fix but I am open to discussion. This @auth.requires(auth.has_membership(role='Admin')) should have been @auth.requires_membership(role='Admin') OR @auth.requires(auth.user and auth.has_membership(role='Admin')) Before @auth.requires(...) was assuming a logged-in us