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
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

dereine - May 26, 2009 - 22:30

should the context access plugin check for $context->data->uid == $globals['user']->uid

#2

merlinofchaos - May 26, 2009 - 22:37

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

pribeh - June 7, 2009 - 02:40

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

pribeh - June 11, 2009 - 23:11

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

merlinofchaos - July 20, 2009 - 17:37
Status:active» fixed

There is now an access plugin for this.

#6

pribeh - July 20, 2009 - 19:50

awesome - now I can be myself again! Thanks merlin.

#7

System Message - August 3, 2009 - 20:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.