Sure, here's a quick copy&paste of our base controller we use for
session-protected controllers:
http://pastebin.com/2AEt2q8E

There's some storage-dependent logic in the User model but it's probably
specific to your app, here is ours based on MongoDB (you'll see calls to
self.get() and self.set() - they're MongoDB field accessors):
http://pastebin.com/vmLqL0Eg

And no, we don't have any roles. Well, we have admin users, but for them we
just call current_user.is_admin() in AdminController.__before__()

--
Cheers,
Ev


On Mon, Jun 21, 2010 at 12:31 PM, Wyatt Baldwin <[email protected]
> wrote:

> On Jun 21, 7:40 am, Eugueny Kontsevoy <[email protected]> wrote:
> > The reason I picked Pylons is precisely because it's not polluted with
> > all-size-fits-all solutions for trivial problems. Coding an
> authentication
> > from scratch takes less than an hour: with "remember me" feature,
> > bcrypt-based hashing, password recovery, etc. And you have to do it just
> > once during your "Pylons career" and carry over from one app to another.
>
> Would you be interested in posting your one-hour-auth solution? I'm
> about to go down this road (roll my own vs repoze vs ?), and seeing a
> simple roll-your-own example would be helpful





> , even though I know I
> can figure it out myself. Also, is this solution authentication only,
> or is there an authorization piece, too?
>
> --
> 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.

Reply via email to