summaryrefslogtreecommitdiff
path: root/app/views/notify/unknown_sign_in_email.html.haml
blob: e252af780609a488298e2a91d68c7316406edc38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
- default_font = "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;"
- default_style = "#{default_font}font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;"
- spacer_style = "#{default_font};height:18px;font-size:18px;line-height:18px;"

%tr.alert
  %td{ style: "#{default_font}padding:10px;border-radius:3px;font-size:14px;line-height:1.3;text-align:center;overflow:hidden;color:#ffffff;background-color:#FC6D26;" }
    %table.img{ border: "0", cellpadding: "0", cellspacing: "0", style: "border-collapse:collapse;margin:0 auto;" }
      %tbody
        %tr
          %td{ style: "#{default_font}vertical-align:middle;color:#ffffff;text-align:center;" }
            %span
              = _("Someone signed in to your %{host} account from a new location") % { host: Gitlab.config.gitlab.host }
%tr.spacer
  %td{ style: spacer_style }
     
%tr.section
  %td{ style: "#{default_font};padding:0 15px;border:1px solid #ededed;border-radius:3px;overflow:hidden;" }
    %table.info{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:100%;" }
      %tbody
        %tr
          %td{ style: default_style }
            = _('Hostname')
          %td{ style: "#{default_style}color:#333333;font-weight:400;width:75%;padding-left:5px;" }
            = Gitlab.config.gitlab.host
        %tr
          %td{ style: "#{default_style}border-top:1px solid #ededed;" }
            = _('User')
          %td{ style: "#{default_style}color:#333333;font-weight:400;width:75%;padding-left:5px;border-top:1px solid #ededed;" }
            #{sanitize_name(@user.name)} (#{@user.username})
        %tr
          %td{ style: "#{default_style}border-top:1px solid #ededed;" }
            = _('IP Address')
          %td{ style: "#{default_style}color:#333333;font-weight:400;width:75%;padding-left:5px;border-top:1px solid #ededed;" }
            %span.muted{ style: "color:#333333;text-decoration:none;" }
              = @ip
        %tr
          %td{ style: "#{default_style}border-top:1px solid #ededed;" }
            = _('Time')
          %td{ style: "#{default_style}color:#333333;font-weight:400;width:75%;padding-left:5px;border-top:1px solid #ededed;" }
            = @time.strftime('%Y-%m-%d %H:%M:%S %Z')
%tr.spacer
  %td{ style: spacer_style }
     
%tr.section
  %td{ style: "#{default_font};line-height:1.4;text-align:center;padding:0 15px;overflow:hidden;" }
    %table.img{ border: "0", cellpadding: "0", cellspacing: "0", style: "border-collapse:collapse;width:100%;" }
      %tbody
        %tr{ style: 'width:100%;' }
          %td{ style: "#{default_style}text-align:center;" }
            - password_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_url('user/profile/user_passwords', anchor: 'change-your-password') }
            = _('If you recently signed in and recognize the IP address, you may disregard this email.')

            - if password_authentication_enabled_for_web?
              %p
                = _('If you did not recently sign in, you should immediately %{password_link_start}change your password%{password_link_end}.').html_safe % { password_link_start: password_link_start, password_link_end: '</a>'.html_safe }
                = _('Passwords should be unique and not used for any other sites or services.')

            - unless @user.two_factor_enabled?
              %p
                - mfa_url = help_page_url('user/profile/account/two_factor_authentication')
                - mfa_link_start = '<a href="%{url}" target="_blank">'.html_safe % { url: mfa_url }
                = _('To further protect your account, consider configuring a %{mfa_link_start}two-factor authentication%{mfa_link_end} method.').html_safe % { mfa_link_start: mfa_link_start, mfa_link_end: '</a>'.html_safe }