Delegator Condition for user/% overrice: "user is self"
joshk - May 26, 2009 - 22:22
| Project: | Chaos tool suite |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | joshk |
| Status: | closed |
Jump to:
Description
Since I need to get more into writing delegator stuff for og_panels, I might as well also take on some low-hanging fruit in the form of a condition I wish existed for user/%: routing to different panels for when "user is self." This will let us support neat "dashboard" type functionality for users, without exposing said functionality to others.

#1
should the context access plugin check for $context->data->uid == $globals['user']->uid
#2
I would actually prefer to make this more generic:
Compare two contexts. I'm not sure if it's feasible to have a single "Compare two contexts" and then choose two contexts of the same type and then delegate the comparison to the context itself or not, but it probably is given how much intelligence we can put into the forms now.
In theory each context can then implement the comparisons with a list of operators + functions to do the comparison.
#3
Uber-mega-quad-bump. This is exactly what I require for three different sites.
merlinofchaos, you mentioned in another thread that perm.inc is a good template to look at for said function. I need this functionality so should I start by using $context->data->uid == $globals['user']->uid?
Thanks
#4
Any luck with this joshk? I've struggled to come up with a handler that works. This feature would truly be of great service.
#5
There is now an access plugin for this.
#6
awesome - now I can be myself again! Thanks merlin.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.