Commit 6efda51cc5caad07b6a01d293daf913eec01901f
1 parent
5ee8c132
Exists in
master
and in
4 other branches
fix edit project members access link and page fixes refs #2745
Showing
4 changed files
with
5 additions
and
5 deletions
Show diff stats
app/controllers/admin/projects/application_controller.rb
app/controllers/admin/projects/members_controller.rb
... | ... | @@ -22,7 +22,7 @@ class Admin::Projects::MembersController < Admin::Projects::ApplicationControlle |
22 | 22 | private |
23 | 23 | |
24 | 24 | def team_member |
25 | - @member ||= project.users.find(params[:id]) | |
25 | + @member ||= project.users.find_by_username(params[:id]) | |
26 | 26 | end |
27 | 27 | |
28 | 28 | def team_member_relation | ... | ... |
app/views/admin/users/show.html.haml
... | ... | @@ -123,5 +123,5 @@ |
123 | 123 | %tr |
124 | 124 | %td= link_to project.name_with_namespace, admin_project_path(project) |
125 | 125 | %td= tm.project_access_human |
126 | - %td= link_to 'Edit Access', edit_admin_team_member_path(tm), class: "btn small" | |
127 | - %td= link_to 'Remove from team', admin_team_member_path(tm), confirm: 'Are you sure?', method: :delete, class: "btn small danger" | |
126 | + %td= link_to 'Edit Access', edit_admin_project_member_path(project.path_with_namespace, tm.user.username), class: "btn small" | |
127 | + %td= link_to 'Remove from team', admin_project_member_path(project.path_with_namespace, tm.user.username), confirm: 'Are you sure?', method: :delete, class: "btn small danger" | ... | ... |
config/routes.rb
... | ... | @@ -84,7 +84,7 @@ Gitlab::Application.routes.draw do |
84 | 84 | get :team |
85 | 85 | put :team_update |
86 | 86 | end |
87 | - scope module: :projects, constraints: { id: /[^\/]+/ } do | |
87 | + scope module: :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ } do | |
88 | 88 | resources :members, only: [:edit, :update, :destroy] |
89 | 89 | end |
90 | 90 | end | ... | ... |