[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Steve Sanyal
Thanks a lot. I'll take a look. Do you write plugins for the framework? Cheers, Steve On Oct 23, 3:17 pm, david wrote: > My email with the attachment appears to have found itself stuck so you can   > find it on Pastie:http://pastie.org/667060 > > If you don't need any support for it - then th

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread david
My email with the attachment appears to have found itself stuck so you can find it on Pastie: http://pastie.org/667060 If you don't need any support for it - then there's a filter attached you can use. It's pretty self evident how it works and it needs to be in your apps//lib folder for th

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Steve Sanyal
Agreed on all points. The solution I would prefer is for the sf_guard_user table to have a "is_disabled" field in addition to its "is_active" field. The disabled field would always be checked in an appropriate filter. I am just surprised there isn't a solution within the framework or the standa

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread david
As Alex suggests - this should be implemented via a filter which ensures the rule is always applied and cannot be bypassed. You'll also get the option of being able to lock out accounts that have an active session. Removing permissions isn't a bright idea - just because an account is locked

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Steve Sanyal
Thanks, yeah I can do this. Really my original question is if anyone has come across any solutions (eg: plugins) that handle this type of action. I don't writing proprietary code for stuff that should really be handled by the framework. :-) Cheers, Steve On Oct 23, 12:28 pm, Alexandre SALOME

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Alexandre SALOME
So the other part would be to overload the hasCredentials method and add in the top of it : if (!$this->isActive()) { return false; } Other solution : create a filter : if the user account is inactive, redirect him class myFilter extends sfFilter { public function execute($filterChain) {

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Steve Sanyal
I've already overloaded signin for a few other reasons, but the solution you suggest would would only be part of the solution, because if I disable a user I would have to remove all of the user's permissions also. Otherwise, the user could manually navigate to a page to which he/she had access.

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Alexandre SALOME
Overload the signin action, and make your test in it : if the account is disabled, redirect to your special page, else, login. Which ORM/symfony version are you using ? 2009/10/23 Steve Sanyal > > Hi, > > Has anyone come across any good solutions for having a disabled user > in symfony? Ideall