Skip to content

Commit

Permalink
Don't show impersonation link in users#edit
Browse files Browse the repository at this point in the history
  • Loading branch information
nounder committed Nov 15, 2017
1 parent 59fa05c commit 3920cdb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/redmine_impersonate/hook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def impersonation_html(context = {})
session = context[:controller].session

return if !User.current.admin? || user == User.current || !user.active? || session[:true_user_id]
return if context[:controller].action_name == 'new'

link = link_to l(:button_impersonate),
{ controller: 'impersonation', action: 'create', user_id: user.id },
Expand Down

0 comments on commit 3920cdb

Please sign in to comment.