Re: LiveUser - Update rights and groups in session

From: Date: Thu, 17 Jun 2004 11:36:00 +0000
Subject: Re: LiveUser - Update rights and groups in session
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13202@lists.php.net to get a copy of this message
Markus Tacker wrote:
Hallo Lukas, Lukas Smith wrote:
Markus Tacker wrote:
if a user's rights/groups change while he is logged in (by his own action) how do I update the perm array in the session?
We currently dont have any feature for this. However you can disable the rights caching with the current CVS version using the new 'cache_perm' option (which defaults to true). If you use the simple or medium container then disabling the cache is not likely to downgrade performance considerably.
Well, I use DB_Complex. Can't be that hard to write a mthod which rereads all his rights, can it? I'll try.
No its not. The problem is more that you change the rights in the Admin API, but the rights are cached per sessions. So in order to update all the session you would need to go through all the sessions for the relevant user. So what needs to happen is that we need to add the ability to cache the rights/groups etc data outside the sessions so that they can be more easily read and modified inside the Admin API while still having high performance in the Client API. That being said we have refactored alot of the client code to make this addition fairly trivial. What needs to happen is a modification to the unfreeze/freeze methods. So whenever things are changed inside the Admin API you would have to determine which users are affected. You would then either delete the cache or regenerate the cache (having this optional would be ideal). Inside the client API you would then check the cache and (and optionally generate the cache if nothing is cached for the user). Thats the idea, now someone needs to implement it. regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07

« previous php.pear.general (#13202) next »