Merge pull request #1025 from okriuchykhin/ok_SCI_2146

Fix user management on project [SCI-2146]
This commit is contained in:
okriuchykhin 2018-03-09 16:42:16 +01:00 committed by GitHub
commit 10505ec4e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -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

View file

@ -1,9 +1,7 @@
<!-- Modal footer for Manage users modal -->
<span class="pull-left">
<% 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) %>
<span><%=t 'projects.index.modal_manage_users.invite_users_details', team: @project.team.name %></span>
<% else %>
<i><%=t 'projects.index.modal_manage_users.contact_admins', team: @project.team.name %></i>