mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 06:36:27 +08:00
cb03ed8384
A new token is generated whenever an edit or view file is called. Tokens have a TTL of one day. Also enabled the toggling of both wopi and wopi test mode, using environmental variables.
8 lines
No EOL
188 B
Ruby
8 lines
No EOL
188 B
Ruby
class Token < ActiveRecord::Base
|
|
|
|
validates :token, presence: true
|
|
validates :ttl, presence: true
|
|
|
|
belongs_to :user, foreign_key: 'user_id', class_name: 'User', inverse_of: :tokens
|
|
|
|
end |