Reviewed & tested by the community
Project:
OG User Roles
Version:
6.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Mar 2010 at 15:19 UTC
Updated:
25 Jun 2013 at 13:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
sunComment #2
henrijs.seso commenteda must feature. for sites that use their own user lists made in views and build group nodes with panels.
views integration will allow better/custom ui, f. ex. for groups with 1000 members needs some filter, no problem to add that with views
users needs to know who is who in group, so label by users name in list is important.
Comment #3
jbizzay commentedI too need this, is there any work on this? i can contribute
Comment #4
jbizzay commentedFor filtering by user roles in specific groups, we will need views integration. I've built this out in a custom module and it is working well. Sometimes I just speak too soon when I think something is working.
Basically what i need is to show a view for a user that has every group node that they are a specific role in. I've built a views filter for this. Can provide a patch if needed. There might be other use cases that are useful as well, though.
Comment #5
mxtIf I have correctly understood your need, I think the solution is using "Views's Access Restriction by role" feature, but unfortunately this doesn't work with OGUR due to this bug: http://drupal.org/node/737292
Can you helping in this?
Thank you!
Comment #6
henrijs.seso commentedneeded
- Views's Access Restriction by role
- Role name fields and promote/demote buttons in Fields
- Sorting by role in Sort criteria
- Role filters for showing only administrators of current group or all groups where user is administrator
- help me out here with this list...
Comment #7
j.helmer commentedFor view's access restriction by role, I point you to my recently posted comment in a different issue: http://drupal.org/node/737292#comment-3284452
Comment #8
dejan.maric.max commentedHi guys,
I've wrote a og_user_roles_views module that integrates og user roles into views.
It doesn't cover the `view's access restriction by role` that j.helmer elaborated in his post.
It Exposes OG user role as:
- Field
- Filter
- Sort
(to see it action view has to be a `user` type)
Comment #9
dejan.maric.max commentedUpdate I've integrated the j.helmer access plugin into module so no need for patching the OGUR module
and it has all the features in one module
Comment #10
sunThanks for working on this, destination_node! However, we don't need another/new module, we need a patch for this module. :)
Comment #11
dejan.maric.max commentedOK,
but it is not uncommon that views integration is a separate module, but it's your call,
Also I want to point out that I also resolved a `allow default role to be different by content type` http://drupal.org/node/837866
so maybe can you look at the code and make a patch (If you think that new approach is OK, for sure).
Comment #12
apdp300 commentedThanks, destination_node I tried this module - it works great - I can make a view of og members giving their og roles on og home page. But I also want to make a view of the og group and roles each user has on each user's own page. Is there a way I can do this? Thanks.
Comment #13
mxtI've tried the module in #9 but "views access restrictions by OGUR roles" doesn't work for me.
I'm using views views-6.x-2.11: I have to use views 3 instead? Let me know please.
Thank you!
MXT
Comment #14
henrijs.seso commenteddeleted comment, wrong issue
Comment #15
henrijs.seso commenteddeleted comment, wrong issue
Comment #16
henrijs.seso commenteddeleted comment, wrong issue
Do not test these files, there is a bug. I opened a new issue #915920: ctools integration and will post updated files there, they will eventually be for ctools integration. I am still very much interested in this issue thou :)
carma -3 for messing up issue queue. my bad.
Comment #17
henrijs.seso commented@destination_node
i found no bugs after all in your code, it was some other problem :) It works good, but am I missing something? If I add exposed filter it will provide all roles as an option. Many use cases have multiple group types and multiple role sets per group. But view is usually placed in one particular group page, so role list in filter should be limited to group roles.
Relationships support would be great so that one could choose a group node from which roles could be loaded. Do you have any plans for this or should I investigate?
Comment #18
dejan.maric.max commentedHi, sorry for the response time, holiday and stuff, anyway no I'm not planing any new features for this and after all this is not a proper module (not registered) and was just `patch like` module while maintainer is one that should decide what will be with this code.
Regarding filters current implementation uses `views_handler_filter_user_roles` which is the default one for roles, you need to write OGUR specific one.
You should try to write that on your own, writing views extension is fun (it's quite different form any other drupal stuff).
Comment #19
gmclelland commentedsubscribing
Comment #20
sanktity commentedSorry for the post, I figured it out.
Comment #21
mtndan commentedThanks destination_node!
Is there a way to utilize this filter on views of node type rather than user views?
I'm trying to get a list of groups where the currently logged in user has the og role of "content manager".
Thanks
Comment #22
xqbzzr commentedsubscribe
Views integration is a must
Comment #23
jzornig commentedI tried the module from #9 and get the following error when i try to add a field to my view that is the users og roles.
Comment #24
jzornig commentedI made the following change to the code from #9 to fix the issue #23.
Comment #25
yrocq commentedI took the code from the previous comments, fixed a duplicate problem and made a patch for OGUR. It doesn't include the access plugin, however.
Comment #26
yrocq commentedComment #27
yrocq commentedSorry for multiple comments.
Comment #28
hefox commentedHm, how is views intergration a bug? Going to be looking into this so sub
Comment #29
hefox commentedINNER JOIN og_users_roles users_comments__og_users_roles ON users_comments__og_uid.uid = users_comments__og_users_roles.uid AND ( og_uid.nid = og_users_roles.gid )Extra like that won't work and respect relationships, going to see what does.
Comment #30
hefox commentedAdding a custom join handler seems to work
Comment #31
hefox commentedviews_join_complex example is outdated, copied construct from it :(!
Comment #32
hefox commentedArgument handler for rid
Comment #33
sunThis looks very appealing already, and I'd be tempted to commit; only the coding style and comments could use some love here and there.
Comment #34
timefor commentedApplied, but I'm not seeing this work at all. Can you explain what I should see? Using Views 3 btw.
Comment #35
jvieille commentedpatch #32 works great!
+1 for committing this
Comment #36
btopro commented@TimeFor you need to reload the module and it shows up.
+1 for committing #32 nice patch!
Comment #37
jzornig commented+1 for commiting
Comment #38
j.helmer commentedHey guys I'm the one who originally wrote the views plugin way back, the one MXT references in the description of this ticket.
I'm currently using it on multiple production sites and it works great.
Was wondering if anyone has enhanced it so that providing the og context argument is not necessary in views?
It would be nice if this plugin could be used on other pages that don't have a group id argument, but just grab the group id from the context of the page.
Comment #39
bsandor commentedHi Guys,
Is there anyone here who is happy to summarise the results here please?
I am completly lost.
Is #8 working fine?
Which is the best version of patches that is doing exactly what?
Thanks folks.
Comment #40
jvieille commented#32 does not seem to work anymore (from OG update?)
Shows in field Groups
Array
Organic groups Roles
Organic groups Roles
and nothing when selected
Comment #41
j.helmer commented@bsandor -
Talk to the maintainer of og_user_roles.
I believe he phased in a version of my views plugin into the dev branch, but I can't be sure.
I can try to provide help, but don't have the resources to fix any issues with newer versions of OGUR.
Comment #42
jvieille commentedActually, this patch works fine.
My issue #40 was my fault : I had activated the module version #8 at the same time,, hence the conflict.
By the way, this module does not appear to be maintained anymore
Comment #43
jlbellido#32 works for me like a charm! Thanks a lot!