[web2py] Disabling few functions for certain users

2010-04-30 Thread Rohan
Hi All, I am creating a session for a user logged in from facebook and wants to disable certain functions like retrieve_password, change_password etc. here is the code for this if not auth.is_logged_in(): user_obj = Storage(user_table._filter_fields(user, id=True))

Re: [web2py] Disabling few functions for certain users

2010-04-30 Thread Thadeus Burgess
You need to store the preferences in the database, what seems to be happening is you are setting the disabled actions, but its being lost on the next request. So along with your auth_user table you probably need to add a couple boolean columns to disable these options, this way it is persistant.

Re: [web2py] Disabling few functions for certain users

2010-04-30 Thread Jonathan Lundell
On Apr 30, 2010, at 7:22 AM, Thadeus Burgess wrote: You need to store the preferences in the database, what seems to be happening is you are setting the disabled actions, but its being lost on the next request. So along with your auth_user table you probably need to add a couple boolean

Re: [web2py] Disabling few functions for certain users

2010-04-30 Thread Thadeus Burgess
I don't think that this is the case. Because since you have both normal users and facebook users =? And you do not have to be logged in to retrieve password. -- Thadeus On Fri, Apr 30, 2010 at 9:38 AM, Jonathan Lundell jlund...@pobox.com wrote: On Apr 30, 2010, at 7:22 AM, Thadeus Burgess

Re: [web2py] Disabling few functions for certain users

2010-04-30 Thread Jonathan Lundell
On Apr 30, 2010, at 8:34 AM, Thadeus Burgess wrote: I don't think that this is the case. Because since you have both normal users and facebook users =? And you do not have to be logged in to retrieve password. Maybe so. But you're retrieving a password associated with a user, and that user