Feature #12795

View group members by non-admin users

Added by Scott Roland almost 9 years ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Groups
Target version:5.0.0
Resolution:Fixed

Description

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):
http://demo.redmine.org/groups

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.

0002-Add-link-from-group-name-to-group-page.patch Magnifier (3.68 KB) Go MAEDA, 2020-11-15 14:13

link-from-group-name-to-group-page.png (213 KB) Go MAEDA, 2020-11-15 14:32

group-page.png (30.3 KB) Go MAEDA, 2020-11-15 14:32

0001-Allow-non-admin-users-to-see-group-members-when-the-.patch Magnifier (2.75 KB) Go MAEDA, 2021-06-12 09:56


Related issues

Related to Redmine - Feature #12796: Display user's groups on profile Closed
Related to Redmine - Feature #12794: Member groups not listed in project page Closed
Related to Redmine - Defect #35823: undefined method `+' for nil:NilClass Closed

Associated revisions

Revision 21072
Added by Go MAEDA 3 months ago

Allow non-admin users to see group members (#12795).

Patch by Go MAEDA.

Revision 21073
Added by Go MAEDA 3 months ago

Add link from group name to group page on project overview page (#12795).

Patch by Go MAEDA.

Revision 21074
Added by Go MAEDA 3 months ago

Set "icon icon-group" CSS classes in _members_box.html.erb instead of ApplicationHeler (#12795).

Revision 21075
Added by Go MAEDA 3 months ago

Link from assignee to group page (#12795).

Revision 21113
Added by Go MAEDA 3 months ago

GroupsController#show should only display visible users (#12795).

Revision 21114
Added by Go MAEDA 3 months ago

Link to the profile page from users on the group page (#12795).

Revision 21203
Added by Go MAEDA about 1 month ago

Fix that test_link_to_principal_should_link_to_user does not actually test anything (#12795).

Revision 21217
Added by Go MAEDA about 1 month ago

Fix NoMethodError when generating a link to a locked user (#12795, #35823).

History

#1 Updated by Jean-Philippe Lang almost 9 years ago

  • Tracker changed from Defect to Feature
  • Subject changed from Non-admin users cannot get info about groups to View group members by non-admin users

#2 Updated by Go MAEDA 12 months ago

+1

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 12 months ago

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 5 months ago

Updated the patch. Make the page layout consistent with the user profile page.

#5 Updated by Go MAEDA 5 months ago

  • File deleted (0001-Allow-non-admin-users-to-see-group-members-when-the-.patch)

#6 Updated by Go MAEDA 4 months ago

  • Target version set to Candidate for next major release

#7 Updated by Go MAEDA 4 months ago

  • Target version changed from Candidate for next major release to 5.0.0

Setting the target version to 5.0.0.

#8 Updated by Go MAEDA 3 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch.

Non-admin users can see group members by clicking a group name on the project overview page.

#9 Updated by Go MAEDA 3 months ago

Go MAEDA wrote:

Committed the patch.

Non-admin users can see group members by clicking a group name on the project overview page.

Also, the assignee field now shows a link to the group page if the assignee is a group (r21075).

#10 Updated by Go MAEDA 2 months ago

  • Related to Defect #35823: undefined method `+' for nil:NilClass added

Also available in: Atom PDF