A thought occurred to me on one possibly very cool use for the new
session stuff:
built-in sudo functionality
If the user has sufficient privilege, they can "become" a different user
on the site. User::identify() would query the $_SESSION['sudo'] for the
effective user ID, and would use that when returning a user object.
User::can() would similarly honor $_SESSION['sudo'] when determining
what you can and cannot do.
In this way, an admin can verify the configuration / settings for
particular users without having to log out and back in multiple times.
We would need to update the admin interface in a number of places to
make this work properly without being too confusing. For example, the
"logout" link at the bottom would need to indicate that logging out
would be to exit the sudo session. Maybe a status indicator in the top
admin bar would be helpful to show who you are logged in as, as well as
any sudo user you're currently operating as.
Thoughts?
--
GPG 9CFA4B35 | ski...@skippy.net | http://skippy.net/
Chris
Otherwise it's a great idea!
Christian
Interesting thought. Moodle (learning management system) does this,
and it's an incredibly useful feature.
cheers, Michael
The way I do this is to use a different browser: I log into sites using
Firefox, and use Epiphany to see what the anonymous users will see. I
suspect you could easily do the same with MSIE and Firefox on Windows.
Christian
-----Original Message-----
From: habar...@googlegroups.com [mailto:habar...@googlegroups.com] On
Behalf Of Scott Merrill
Sent: 25. november 2007 00:19
To: habar...@googlegroups.com
Subject: [habari-dev] Re: r1116