Re: [CDBI] session handling in cdbi

[prev] [thread] [next] [Date index for 2005/10/04]

From: William Ross
Subject: Re: [CDBI] session handling in cdbi
Date: 16:50 on 04 Oct 2005
On 4 Oct 2005, at 09:51, Patrik Wallstrom wrote:

> Hi!
>
> I am trying to figure out a smart way of handling permissions in
> Class::DBI. The idea is having a kind of session object and pass that
> around.

You don't say what you're working on, but session-based access  
control suggests that it's a web application, or some other stateless  
system that needs a bit of continuity. If that's right, then you  
should find the standard methods work quite well. I use  
Apache::Authcookie and some fairly simple user and group classes to  
restrict access to objects and functions, but other methods should  
work equally well. They will usually make your current-user  
information more or less environmental and save you having to pass  
around session information.

If you're encountering problems, it's more likely that they're  
architectural. Class::DBI is very clean when there is one user  
accessing one datasource through one instance of a script, but in a  
persistent environment it quickly gets tangled up. We would need to  
know more about your application to make any suggestions there.

If this isn't an online application, or some other request-based  
service, then I wonder whether session-based access control is the  
right answer? You should be able to rely on existing context rather  
than passing a person around.

best,

will


_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] session handling in cdbi
Patrik Wallstrom 08:51 on 04 Oct 2005

Re: [CDBI] session handling in cdbi
Matt S Trout 15:23 on 04 Oct 2005

Re: [CDBI] session handling in cdbi
William Ross 16:50 on 04 Oct 2005

Generated at 10:29 on 10 Oct 2005 by mariachi v0.52