Class: Platform::AccessToken

Inherits:
Object
  • Object
show all
Includes:
Doorkeeper::Orm::ActiveRecord::Mixins::AccessToken
Defined in:
app/models/platform/access_token.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



37
38
39
40
41
42
43
# File 'app/models/platform/access_token.rb', line 37

def description
  if system_level?
    application.name
  else
    super
  end
end

#label_stringObject

🚅 add delegations above.



28
29
30
# File 'app/models/platform/access_token.rb', line 28

def label_string
  description
end

#system_level?Boolean

Returns:

  • (Boolean)


32
33
34
35
# File 'app/models/platform/access_token.rb', line 32

def system_level?
  return false unless application
  !application.team_id
end