diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-11-22 11:53:53 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-12-16 12:38:10 +0300 |
commit | 1d0ccec6dd8375b751846f69bb170ebd11e9a391 (patch) | |
tree | be7f4331508c7cbcd1da679bfb0d3def05da5e2a /app | |
parent | 49a70d1e45b4f841379db059177856671c65159c (diff) |
Add a `scopes` column to the `personal_access_tokens` table
Diffstat (limited to 'app')
-rw-r--r-- | app/models/personal_access_token.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/personal_access_token.rb b/app/models/personal_access_token.rb index c4b095e0c04..10a34c42fd8 100644 --- a/app/models/personal_access_token.rb +++ b/app/models/personal_access_token.rb @@ -2,6 +2,8 @@ class PersonalAccessToken < ActiveRecord::Base include TokenAuthenticatable add_authentication_token_field :token + serialize :scopes, Array + belongs_to :user scope :active, -> { where(revoked: false).where("expires_at >= NOW() OR expires_at IS NULL") } |