mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-13 16:45:18 +08:00
Fix user management on project [SCI-2146]
This commit is contained in:
parent
160935cde0
commit
940469e41b
2 changed files with 3 additions and 5 deletions
|
@ -191,8 +191,8 @@ class UserProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_manage_permisisons
|
def check_manage_permisisons
|
||||||
render_403 unless can_manage_project?(@project) &&
|
render_403 unless can_manage_project?(@project) ||
|
||||||
params[:id] == current_user.id
|
params[:id] != current_user.id
|
||||||
end
|
end
|
||||||
|
|
||||||
def init_gui
|
def init_gui
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
<!-- Modal footer for Manage users modal -->
|
<!-- Modal footer for Manage users modal -->
|
||||||
<span class="pull-left">
|
<span class="pull-left">
|
||||||
<% if current_user.is_admin_of_team?(@project.team) %>
|
<% if current_user.is_admin_of_team?(@project.team) %>
|
||||||
<%= link_to t('projects.index.modal_manage_users.invite_users_link'),
|
<%= link_to t('projects.index.modal_manage_users.invite_users_link'), team_path(@project.team.id) %>
|
||||||
"/settings/teams/#{@project.team.id}",
|
|
||||||
data: { turbolinks: false } %>
|
|
||||||
<span><%=t 'projects.index.modal_manage_users.invite_users_details', team: @project.team.name %></span>
|
<span><%=t 'projects.index.modal_manage_users.invite_users_details', team: @project.team.name %></span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<i><%=t 'projects.index.modal_manage_users.contact_admins', team: @project.team.name %></i>
|
<i><%=t 'projects.index.modal_manage_users.contact_admins', team: @project.team.name %></i>
|
||||||
|
|
Loading…
Add table
Reference in a new issue