Thanks, worked perfect for me! On Sun, Apr 25, 2010 at 2:57 PM, Mike Orr <[email protected]> wrote:
> On Sun, Apr 25, 2010 at 4:03 AM, Weixi Yen <[email protected]> wrote: > > I'm trying to create a process to deactivate users, and having those > > deactivated users redirected to a account_inactive page when they try to > > access the application. > > > > Is there a file in Pylons that runs right before all the controllers > which > > can be used to redirect authkit users of a certain group to a specific > > handler? > > The base controller. Any code in the .__before__ method, or in the > first part of .__call__, will be run before the regular action. So > you could have AuthKit check the username and redirect to /inactive if > it's not allowed. I don't know the specific AuthKit syntax but I > assume it can do that. > > The other way would be to write a middleware to wrap the application > in, which would do the same thing. But the base controller way is > probably easier, unless you want a middleware to use in several > similar applications. > > -- > Mike Orr <[email protected]> > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<pylons-discuss%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/pylons-discuss?hl=en. > > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
