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



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

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

#label_stringObject

🚅 add delegations above.



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

def label_string
  description
end

#system_level?Boolean

Returns:

  • (Boolean)


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

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