diff --git a/app/controllers/user_projects_controller.rb b/app/controllers/user_projects_controller.rb index 507c98da2..a64fb52af 100644 --- a/app/controllers/user_projects_controller.rb +++ b/app/controllers/user_projects_controller.rb @@ -191,8 +191,8 @@ class UserProjectsController < ApplicationController end def check_manage_permisisons - render_403 unless can_manage_project?(@project) && - params[:id] == current_user.id + render_403 unless can_manage_project?(@project) || + params[:id] != current_user.id end def init_gui diff --git a/app/views/user_projects/_index_edit_footer.html.erb b/app/views/user_projects/_index_edit_footer.html.erb index 8dbe3ddb7..cd76a65f2 100644 --- a/app/views/user_projects/_index_edit_footer.html.erb +++ b/app/views/user_projects/_index_edit_footer.html.erb @@ -1,9 +1,7 @@ <% if current_user.is_admin_of_team?(@project.team) %> - <%= link_to t('projects.index.modal_manage_users.invite_users_link'), - "/settings/teams/#{@project.team.id}", - data: { turbolinks: false } %> + <%= link_to t('projects.index.modal_manage_users.invite_users_link'), team_path(@project.team.id) %> <%=t 'projects.index.modal_manage_users.invite_users_details', team: @project.team.name %> <% else %> <%=t 'projects.index.modal_manage_users.contact_admins', team: @project.team.name %>