summaryrefslogtreecommitdiff
path: root/app/views/profiles/personal_access_tokens/index.html.haml
blob: b96251cd982dba4607f3cd6387fd29e9796b474a (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
63
64
65
66
67
68
69
- breadcrumb_title "Access Tokens"
- page_title "Personal Access Tokens"
- @content_class = "limit-container-width" unless fluid_layout


.row.prepend-top-default
  .col-lg-4.profile-settings-sidebar
    %h4.prepend-top-0
      = page_title
    %p
      You can generate a personal access token for each application you use that needs access to the GitLab API.
    %p
      You can also use personal access tokens to authenticate against Git over HTTP.
      They are the only accepted password when you have Two-Factor Authentication (2FA) enabled.

  .col-lg-8
    - if @new_personal_access_token
      .created-personal-access-token-container
        %h5.prepend-top-0
          Your New Personal Access Token
        .form-group
          .input-group
            = text_field_tag 'created-personal-access-token', @new_personal_access_token, readonly: true, class: "form-control js-select-on-focus", 'aria-describedby' => "created-personal-access-token-help-block"
            %span.input-group-btn
              = clipboard_button(text: @new_personal_access_token, title: "Copy personal access token to clipboard", placement: "left", class: "btn-default btn-clipboard")
          %span#created-personal-access-token-help-block.help-block.text-danger Make sure you save it - you won't be able to access it again.

      %hr

    = render "shared/personal_access_tokens_form", path: profile_personal_access_tokens_path, impersonation: false, token: @personal_access_token, scopes: @scopes

    = render "shared/personal_access_tokens_table", impersonation: false, active_tokens: @active_personal_access_tokens, inactive_tokens: @inactive_personal_access_tokens

%hr
.row.prepend-top-default
  .col-lg-4.profile-settings-sidebar
    %h4.prepend-top-0
      RSS token
    %p
      Your RSS token is used to authenticate you when your RSS reader loads a personalized RSS feed, and is included in your personal RSS feed URLs.
    %p
      It cannot be used to access any other data.
  .col-lg-8.rss-token-reset
    = label_tag :rss_token, 'RSS token', class: "label-light"
    = text_field_tag :rss_token, current_user.rss_token, class: 'form-control', readonly: true, onclick: 'this.select()'
    %p.help-block
      Keep this token secret. Anyone who gets ahold of it can read activity and issue RSS feeds as if they were you.
      You should
      = link_to 'reset it', [:reset, :rss_token, :profile], method: :put, data: { confirm: 'Are you sure? Any RSS URLs currently in use will stop working.' }
      if that ever happens.

- if incoming_email_token_enabled?
  %hr
  .row.prepend-top-default
    .col-lg-4.profile-settings-sidebar
      %h4.prepend-top-0
        Incoming email token
      %p
        Your incoming email token is used to authenticate you when you create a new issue by email, and is included in your personal project-specific email addresses.
      %p
        It cannot be used to access any other data.
    .col-lg-8.incoming-email-token-reset
      = label_tag :incoming_email_token, 'Incoming email token', class: "label-light"
      = text_field_tag :incoming_email_token, current_user.incoming_email_token, class: 'form-control', readonly: true, onclick: 'this.select()'
      %p.help-block
        Keep this token secret. Anyone who gets ahold of it can create issues as if they were you.
        You should
        = link_to 'reset it', [:reset, :incoming_email_token, :profile], method: :put, data: { confirm: 'Are you sure? Any issue email addresses currently in use will stop working.' }
        if that ever happens.