[TurboGears] Re: PATCH - Add Authorization and fix for Opera JSON

2005-10-09 Thread Krys Wilken
This is a conversation that I had with John Miller. He has agreed to let me post it here so others can benefit. All comments/questions are welcome. I hope other find this useful. Krys Sure :-) I have attached the model I use as well as my auth.py module that has the decorators and

[TurboGears] Re: PATCH - Add Authorization and fix for Opera JSON

2005-10-07 Thread Krys Wilken
Hmm... I haven't started using Ajax in TG yet, so I had not thought of that. Since I am planning on using ajax, I had better figure out what I am going to do. :-) Thanks much. [EMAIL PROTECTED] wrote: I use the same approach(decorator on selectioned url links). The login form is just a

[TurboGears] Re: PATCH - Add Authorization and fix for Opera JSON

2005-10-07 Thread [EMAIL PROTECTED]
Keep in mind that if TurboGears is in control of both the authentication/authorization *and* the choice of HTML vs. JSON, that means that making an AJAX request that gets JSON back can automatically trigger a JSON response that represents an authentication failure. This is the nice thing about

[TurboGears] Re: PATCH - Add Authorization and fix for Opera JSON

2005-10-07 Thread Kevin Dangoor
On 10/7/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Keep in mind that if TurboGears is in control of both the authentication/authorization *and* the choice of HTML vs. JSON, that means that making an AJAX request that gets JSON back can automatically trigger a JSON response that

[TurboGears] Re: PATCH - Add Authorization and fix for Opera JSON

2005-10-05 Thread Krys Wilken
For my project I just created a couple tables, Users and Roles and built a very simple authentication system consisting of 2 decorators, require_login and require_role. This meets my needs right now, as I prefer form-based logins over http password pop-ups (basic and digest). However it would