RE: [PEAR-DEV] liveUser: changing permissions for active sessions

From: Date: Mon, 19 Aug 2002 12:31:42 +0000
Subject: RE: [PEAR-DEV] liveUser: changing permissions for active sessions
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-8504@lists.php.net to get a copy of this message
> So how to best go about solving this problem? > I have asked several people on IRC about this > > 1) when the rights are changed, check all active sessions if > any of them > are affected by this change. Modify all affected sessions accordingly. > > 2) when the rights are changed, check all active sessions if > any of them > are affected by this change. Set a flag that is read at every > loading of > the page that tells liveUser to re-read the permissions, or maybe even > just modify the existing array that stores all the permissions > > 1) seems fairly ugly but fairly performant > > 2) seems a lot cleaner, yet it means that for every request the flag > needs to be checked. This method has the added advantage that > only those > sessions are corrected that are actually still in use (not like the > above method that changes all affected active sessions). Finally this > method requires little changes and is less php session > specific, making > other native session handlers much easier to implant. > > I guess this feature could be made optional. This seems the best course, the second way (the clean one) and making it optional. Otherwise you just tell your users to logout and login again. > If performance is critical using SRM might resolve the performance > issues associated with reading the flag. Is SRM stable enough ? > Opinions?

« previous php.pear.dev (#8504) next »