liveUser: changing permissions for active sessions
| From: | Lukas Smith | Date: | Mon, 19 Aug 2002 12:18:45 +0000 |
| Subject: | liveUser: changing permissions for active sessions | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-8502@lists.php.net to get a copy of this message | ||
Hi,
I want to avoid the following scenario:
User asks the content manager with sufficient rights to give him access
to a certain part of the CMS.
The content manager quickly gives the user the right and informs the
user. The user still has a browser open, but still cannot use the right.
He calls the content manager, who then checks again and again and again.
The real problem is that liveUser currently does not have a mechanism to
change the permissions of active sessions, since the permissions of each
user are stored in a session.
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.
If performance is critical using SRM might resolve the performance
issues associated with reading the flag.
Opinions?
Regards,
Lukas Smith
smith@dybnet.de
_______________________________
DybNet Internet Solutions GbR
Reuchlinstr. 10-11
Gebäude 4 1.OG Raum 6 (4.1.6)
10553 Berlin
Germany
Tel. : +49 30 83 22 50 00
Fax : +49 30 83 22 50 07
www.dybnet.de info@dybnet.de