Would it be possible to add a condition on whether the current user was the an admin for the group in context?

CommentFileSizeAuthor
#1 1043034-og_member_status-1-D6.patch3.52 KBxamanu

Comments

xamanu’s picture

Title: condition if user is og admin? » condition for og member status
Version: 6.x-3.0 » 6.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new3.52 KB

Hi, I needed something similar: To have a context depending on a member status of a group. Since I saw your case first I implemented the admin check as well. It was just a couple of lines more.

With this patch there should be a new condition for context module available that checks inside a given group context the member status of the current user. The conditions can be either: "Not a member", "Member of the group", or "Admin of the group".

Please test the patch.

david.mccandless’s picture

This is exactly what I was looking to do as well. I just tried the patch and it works great for me, although I have not done much testing yet. Thanks so much xamanu.

david.mccandless’s picture

I have added a few more contexts and done more testing with the patch and it is working great for me. Thanks again.

mtndan’s picture

Thank you!

Crom’s picture

Version: 6.x-3.x-dev » 6.x-3.0

Works perfectly here, thank you!

igorik’s picture

can be it ported into the module? is it maintaned yet?

paul2’s picture

subscribing.

felipe’s picture

+1 for this feature in the module.

igorik’s picture

Status: Needs review » Reviewed & tested by the community
goose2000’s picture

Is this in the dev version now? Guess I could go look at the code...
UPDATE: Uh no, there is no

context_og_condition_member_status

in the dev code

goose2000’s picture

Just an update. I got github going today, applied this patch and it is working just great, as expected. Now only my admins can use the 'group details' block; that allow them to create new content - awesome.

jgraham’s picture

Status: Reviewed & tested by the community » Fixed

Hey all thanks for the reviews and sorry to leave this hanging for so long.

I wanted to get the equivalent in for 7.x-2.x branch first which also handles group roles.

http://drupalcode.org/project/context_og.git/commit/1a6bd88
http://drupalcode.org/project/context_og.git/commit/7611efc

Status: Fixed » Closed (fixed)

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