Commit 6efda51c authored by Andrey Kumanyaev's avatar Andrey Kumanyaev

fix edit project members access link and page fixes refs #2745

parent 5ee8c132
...@@ -6,6 +6,6 @@ class Admin::Projects::ApplicationController < Admin::ApplicationController ...@@ -6,6 +6,6 @@ class Admin::Projects::ApplicationController < Admin::ApplicationController
protected protected
def project def project
@project ||= Project.find_by_path(params[:project_id]) @project ||= Project.find_with_namespace(params[:project_id])
end end
end end
...@@ -22,7 +22,7 @@ class Admin::Projects::MembersController < Admin::Projects::ApplicationControlle ...@@ -22,7 +22,7 @@ class Admin::Projects::MembersController < Admin::Projects::ApplicationControlle
private private
def team_member def team_member
@member ||= project.users.find(params[:id]) @member ||= project.users.find_by_username(params[:id])
end end
def team_member_relation def team_member_relation
......
...@@ -123,5 +123,5 @@ ...@@ -123,5 +123,5 @@
%tr %tr
%td= link_to project.name_with_namespace, admin_project_path(project) %td= link_to project.name_with_namespace, admin_project_path(project)
%td= tm.project_access_human %td= tm.project_access_human
%td= link_to 'Edit Access', edit_admin_team_member_path(tm), class: "btn small" %td= link_to 'Edit Access', edit_admin_project_member_path(project.path_with_namespace, tm.user.username), class: "btn small"
%td= link_to 'Remove from team', admin_team_member_path(tm), confirm: 'Are you sure?', method: :delete, class: "btn small danger" %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"
...@@ -84,7 +84,7 @@ Gitlab::Application.routes.draw do ...@@ -84,7 +84,7 @@ Gitlab::Application.routes.draw do
get :team get :team
put :team_update put :team_update
end end
scope module: :projects, constraints: { id: /[^\/]+/ } do scope module: :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ } do
resources :members, only: [:edit, :update, :destroy] resources :members, only: [:edit, :update, :destroy]
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment