diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-10 15:14:59 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-14 12:07:33 +0200 |
commit | 90dafe31c4b1bb54bcd0476a873c4f5cdb62e981 (patch) | |
tree | e10e6d5ade6a13c3311f222ca45856966ffc6df2 | |
parent | 2a1d4255da396d37579e25dd88d5a9ea76116c22 (diff) | |
download | gitlab-ce-90dafe31c4b1bb54bcd0476a873c4f5cdb62e981.tar.gz |
Only show invited users to people who can admin group.
-rw-r--r-- | app/controllers/groups/group_members_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/projects/project_members_controller.rb | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/groups/group_members_controller.rb b/app/controllers/groups/group_members_controller.rb index 93fc4edb3bb..f8aa4b0bbd5 100644 --- a/app/controllers/groups/group_members_controller.rb +++ b/app/controllers/groups/group_members_controller.rb @@ -11,6 +11,7 @@ class Groups::GroupMembersController < Groups::ApplicationController def index @project = @group.projects.find(params[:project_id]) if params[:project_id] @members = @group.group_members + @members = @members.non_invite unless can?(current_user, :admin_group, @group) if params[:search].present? users = @group.users.search(params[:search]).to_a diff --git a/app/controllers/projects/project_members_controller.rb b/app/controllers/projects/project_members_controller.rb index 99ee3ebf92e..148768e8fa1 100644 --- a/app/controllers/projects/project_members_controller.rb +++ b/app/controllers/projects/project_members_controller.rb @@ -6,6 +6,7 @@ class Projects::ProjectMembersController < Projects::ApplicationController def index @project_members = @project.project_members + @project_members = @project_members.non_invite unless can?(current_user, :admin_project, @project) if params[:search].present? users = @project.users.search(params[:search]).to_a @@ -17,6 +18,7 @@ class Projects::ProjectMembersController < Projects::ApplicationController @group = @project.group if @group @group_members = @group.group_members + @group_members = @group_members.non_invite unless can?(current_user, :admin_group, @group) if params[:search].present? users = @group.users.search(params[:search]).to_a |