diff options
author | Jarka Košanová <jarka@gitlab.com> | 2019-02-13 11:50:24 +0100 |
---|---|---|
committer | Jarka Košanová <jarka@gitlab.com> | 2019-02-20 10:17:49 +0100 |
commit | 38f3c2e18684f94f75ab52e5039203e8321ed7d7 (patch) | |
tree | 6d24ff69dc9f88a24aa76d98c5ef4f43b98e9280 /app/views/notify | |
parent | 66b20a66f4b25a69ff3f59da855ac2cb38c8bca9 (diff) | |
download | gitlab-ce-38f3c2e18684f94f75ab52e5039203e8321ed7d7.tar.gz |
Remove link after issue move when no permissions
Don't show new issue link after move
when a user does not have permissions
to display the new issue
Diffstat (limited to 'app/views/notify')
-rw-r--r-- | app/views/notify/issue_moved_email.html.haml | 11 | ||||
-rw-r--r-- | app/views/notify/issue_moved_email.text.erb | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/app/views/notify/issue_moved_email.html.haml b/app/views/notify/issue_moved_email.html.haml index 472c31e9a5e..b766cb1a523 100644 --- a/app/views/notify/issue_moved_email.html.haml +++ b/app/views/notify/issue_moved_email.html.haml @@ -1,6 +1,9 @@ %p Issue was moved to another project. -%p - New issue: - = link_to project_issue_url(@new_project, @new_issue) do - = @new_issue.title +- if @can_access_project + %p + New issue: + = link_to project_issue_url(@new_project, @new_issue) do + = @new_issue.title +- else + You don't have access to the project. diff --git a/app/views/notify/issue_moved_email.text.erb b/app/views/notify/issue_moved_email.text.erb index 66ede43635b..985e689aa9d 100644 --- a/app/views/notify/issue_moved_email.text.erb +++ b/app/views/notify/issue_moved_email.text.erb @@ -1,4 +1,8 @@ Issue was moved to another project. +<% if @can_access_project %> New issue location: <%= project_issue_url(@new_project, @new_issue) %> +<% else %> +You don't have access to the project. +<% end %> |