View group members by non-admin users
|Assignee:||Go MAEDA||% Done:|
There is currently no way for a user to find out who is a member of which groups. I would like this page (and the individual group pages) to be visible by non-admin users (although obviously not editable):
In conjunction with Feature Request #12794 (Member groups not listed in project page), here is how I would see it being used:
I open a new Bug Issue for a project and assign it to the group "Database-Developers". When nothing happens with the issue, I want to know who is in that group so that I can talk to them in person.
Add link from group name to group page on project overview page (#12795).
Patch by Go MAEDA.
Set "icon icon-group" CSS classes in _members_box.html.erb instead of ApplicationHeler (#12795).
Fix that test_link_to_principal_should_link_to_user does not actually test anything (#12795).
#2 Updated by Go MAEDA over 1 year ago
The following code allows users to see group members according to "Users visibility" setting (#11724) of their role.
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index fb21e2f05..68fa826c9 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -21,7 +21,7 @@ class GroupsController < ApplicationController layout 'admin' self.main_menu = false - before_action :require_admin + before_action :require_admin, :except => [:show] before_action :find_group, :except => [:index, :new, :create] accept_api_auth :index, :show, :create, :update, :destroy, :add_users, :remove_user @@ -50,6 +50,8 @@ class GroupsController < ApplicationController end def show + return render_404 unless @group.visible? + respond_to do |format| format.html format.api
#3 Updated by Go MAEDA over 1 year ago
- File 0001-Allow-non-admin-users-to-see-group-members-when-the-.patch added
- File 0002-Add-link-from-group-name-to-group-page.patch added
- File link-from-group-name-to-group-page.png added
- File group-page.png added
The attached patches implement the feature.
- A user can see /groups/:id page that displays group members if the group is visible for the user. The visibility of the group follows "Users visibility" setting of roles
- Adds links from group names to /groups/:id page
#4 Updated by Go MAEDA about 1 year ago
Updated the patch. Make the page layout consistent with the user profile page.