On Oct 25, 2007, at 1:21 PM, Yannick Gingras wrote:
> > Michael Bayer <[EMAIL PROTECTED]> writes: > >> If you were setting ctx.current.flush to something for every new >> session, the approach here would be the same (Session ().flush = >> abort_ro). if you were only setting ctx.current.flush to abort_ro() >> at the module level, then your 0.3 approach wasn't working either >> (since 'current' is a functional property) ;). > > Oops! > > Yeah I was setting it on a per-session basis. There is a global > read-only mode but there is also a per-request read-only mode. I use > it to implement soft-bans: a banned user can read the site but he > can't make changes. > > What do you recommend for a per-session read-only mode? well the monkeypatch idea youre doing now seems to work. another way would be to do it at the DB permission level. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---