thecore 1.6.3 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 265d4590db0a220ca165fdf093592cbcbf55c590
4
- data.tar.gz: e6c7f9150df4abc586daa3aa2815b959a9ca3fe8
3
+ metadata.gz: 8d7ac73f11dc87b34dd6096aea3a934064583105
4
+ data.tar.gz: 6900ef76ce2cbef6f56cbb2a618d2c377c054447
5
5
  SHA512:
6
- metadata.gz: f7f32e0ae0285585c4d18a6064a286250b6e8abb466d6c43929a30776451081aeb7857a159d58842e3528e7303308f864e83440faabc4b22f3a8f8a57b937ed2
7
- data.tar.gz: fcf21af6acecd87fc68549653011e6c2279684aa0167cdd5e27c7d205e234b0957e638a4e0181d36b2ee3aa5510d4586153408447d1bea5ef0957d19aab52832
6
+ metadata.gz: fc66e15eb631c9d0342ad307c926859813dc2d01306ef4c272e02cca703ce1cd162cd509eb94512169927391265ae088a5a5fc4a4bf62d7ae9593468f87a9b00
7
+ data.tar.gz: bfe7e2618589cd09747f8e22558ad4b0ef3ec1fb740bed8705e06dddbd700705b7310c816e69bb3a231098b6949aa5bb80cc8fafae3fcd3218dd9e1aee859f7a
@@ -2,7 +2,7 @@ class User < ApplicationRecord
2
2
  include RailsAdmin
3
3
  # # include default devise modules. Others available are:
4
4
  # :confirmable, :lockable, :timeoutable and :omniauthable
5
- devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable #, :confirmable
5
+ devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable, :timeoutable #, :confirmable
6
6
 
7
7
  before_create :generate_authentication_token
8
8
 
@@ -51,7 +51,12 @@ class User < ApplicationRecord
51
51
  def self.users_count
52
52
  where(admin: false, locked: false).count
53
53
  end
54
-
54
+
55
+ def timeout_in
56
+ return 30.minutes if admin?
57
+ 1.day
58
+ end
59
+
55
60
  def title
56
61
  username
57
62
  end
@@ -1,3 +1,3 @@
1
1
  module Thecore
2
- VERSION = '1.6.3'.freeze
2
+ VERSION = '1.6.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-05 00:00:00.000000000 Z
11
+ date: 2018-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails