diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-28 18:18:48 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-29 11:29:07 -0200 |
commit | 867dcdf75012a7b7c8b131d46b275b28fa5bfa00 (patch) | |
tree | 80085890c1cdba08442db7864dc456f657d62991 /app/views/invites | |
parent | 84638de6a35f2a3391117db5b692e8641d9ee061 (diff) | |
download | gitlab-ce-867dcdf75012a7b7c8b131d46b275b28fa5bfa00.tar.gz |
Alert user when logged in user email is not the same as the invitation
Diffstat (limited to 'app/views/invites')
-rw-r--r-- | app/views/invites/show.html.haml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/views/invites/show.html.haml b/app/views/invites/show.html.haml index 2fd4859c1c6..882fdf1317d 100644 --- a/app/views/invites/show.html.haml +++ b/app/views/invites/show.html.haml @@ -6,7 +6,7 @@ - if inviter = @member.created_by by = link_to inviter.name, user_url(inviter) - to join + to join - case @member.source - when Project - project = @member.source @@ -20,11 +20,18 @@ = link_to group.name, group_url(group) as #{@member.human_access}. -- if @member.source.users.include?(current_user) +- is_member = @member.source.users.include?(current_user) + +- if is_member %p However, you are already a member of this #{@member.source.is_a?(Group) ? "group" : "project"}. Sign in using a different account to accept the invitation. -- else + +- if @member.invite_email != current_user.email + %p + Note that this invitation was sent to #{mail_to @member.invite_email}, but you are signed in as #{link_to current_user.to_reference, user_url(current_user)} with email #{mail_to current_user.email}. + +- unless is_member .actions = link_to "Accept invitation", accept_invite_url(@token), method: :post, class: "btn btn-success" = link_to "Decline", decline_invite_url(@token), method: :post, class: "btn btn-danger prepend-left-10" |