Module: AccessTokensHelper

Includes:
AccountsHelper, ApplicationHelper
Defined in:
app/helpers/access_tokens_helper.rb

Instance Method Summary collapse

Methods included from ApplicationHelper

#active_when, #add_page_specific_style, #add_page_startup_api_call, #admin_section?, #asset_to_string, #autocomplete_data_sources, #body_data, #body_data_page, #client_class_list, #client_js_flags, #collapsed_sidebar?, #conditional_link_to, #current_action?, #current_controller?, #dispensable_render, #dispensable_render_if_exists, #edited_time_ago_with_tooltip, #external_storage_url_or_path, #extra_config, #gitlab_config, #gitlab_ui_form_for, #hexdigest, #instance_review_permitted?, #last_commit, #linkedin_url, #locale_path, #outdated_browser?, #page_class, #page_filter_path, #page_startup_api_calls, #partial_exists?, #path_to_key, #project_data, promo_host, #promo_host, #promo_url, #read_only_message, #registry_config, #render_if_exists, #show_callout?, #show_last_push_widget?, #simple_sanitize, #static_objects_external_storage_enabled?, #stylesheet_link_tag_defer, #support_url, #system_message_class, #template_exists?, #time_ago_with_tooltip, #truncate_first_line, #twitter_url

Methods included from AccountsHelper

#incoming_email_token_enabled?

Instance Method Details

#expires_at_field_dataObject


31
32
33
# File 'app/helpers/access_tokens_helper.rb', line 31

def expires_at_field_data
  {}
end

#scope_description(prefix) ⇒ Object


7
8
9
# File 'app/helpers/access_tokens_helper.rb', line 7

def scope_description(prefix)
  prefix == :project_access_token ? [:doorkeeper, :project_access_token_scope_desc] : [:doorkeeper, :scope_desc]
end

#tokens_app_dataObject


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'app/helpers/access_tokens_helper.rb', line 11

def tokens_app_data
  {
    feed_token: {
      enabled: !Gitlab::CurrentSettings.disable_feed_token,
      token: current_user.feed_token,
      reset_path: reset_feed_token_profile_path
    },
    incoming_email_token: {
      enabled: incoming_email_token_enabled?,
      token: current_user.enabled_incoming_email_token,
      reset_path: reset_incoming_email_token_profile_path
    },
    static_object_token: {
      enabled: static_objects_external_storage_enabled?,
      token: current_user.enabled_static_object_token,
      reset_path: reset_static_object_token_profile_path
    }
  }.to_json
end