thecore_auth_commons 2.3.6 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d768f07a4453c22a5f054829d3876d9ffaa1631db6ded68c197f4d0d9dc0b23c
4
- data.tar.gz: a9b67b83f90eaae2855f1bb23a684e88c04e3441db5ddd724909c0b5522325c5
3
+ metadata.gz: 4acad495feb9d92eff86dd20afd5a7611d245c8d74c7e9d3f2b6f1debe85c64e
4
+ data.tar.gz: 91c1a713d685027a6d900f109daf8d661b1a72a36970f1f61676c5be2b8fca07
5
5
  SHA512:
6
- metadata.gz: 1042358e70ec7f2ff8ab405636be208e6e701a7cede2879832302d1d1d8c30868d09ff8d684f65f7ea509870ac943bfd41ae7f2de26fcba143b4c4b7b0cf938f
7
- data.tar.gz: 7fb3eabb340f5591a1b1d777d32b414eafb8772e8890a48362baf1f7ea01bfb6801ece5459ed4402a2b1a697e287cd74da4d576a03707b91e04f4046172ea49a
6
+ metadata.gz: 573be777ba6886dd931f9e5b5269079ae49cb3ba396bb662609dd337bfe37eb3e1202cc534fb8e1c6d066ea38db0dcb22bfcd7b4a139ec4fd6db9585d2f1f308
7
+ data.tar.gz: d135e49ad91e14d6ca45bb66752a8a9b4db6bc677d5b0518c0fc89c9abb29ad0e69d4e7b872974e84b30bc55b452f282b5c62be87695df5b9a794413e3b1d3e8
@@ -24,8 +24,10 @@ it:
24
24
  password_confirmation: Conferma Password
25
25
  role:
26
26
  users: Utenti
27
- name: Nome
27
+ name: Ruolo
28
28
  permissions: Permessi
29
+ created_at: Data di creazione
30
+ updated_at: Ultimo aggiornamento
29
31
  permission:
30
32
  predicate: Predicato
31
33
  action: Azione
data/db/seeds.rb CHANGED
@@ -10,6 +10,16 @@ unless User.where(admin: true).exists?
10
10
  u.save(validate: false)
11
11
  end
12
12
 
13
+ # If there are previous users without the access_token, create it:
14
+ User.all.each do |u|
15
+ if u.access_token.blank?
16
+ begin
17
+ u.access_token = SecureRandom.uuid #urlsafe_base64(32)
18
+ end while ::User.exists?(access_token: u.access_token)
19
+ u.save(validate: false)
20
+ end
21
+ end
22
+
13
23
  @values = {
14
24
  predicates: %i[can cannot],
15
25
  actions: %i[manage create read update destroy],
@@ -2,6 +2,7 @@ require 'devise'
2
2
  require 'cancancan'
3
3
  require 'kaminari'
4
4
  require 'activerecord-nulldb-adapter'
5
+ require 'active_record/hierarchical_query'
5
6
  require 'abilities/thecore_auth_commons'
6
7
 
7
8
  require "thecore_auth_commons/engine"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_auth_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.6
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-15 00:00:00.000000000 Z
11
+ date: 2021-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.7'
83
+ - !ruby/object:Gem::Dependency
84
+ name: activerecord-hierarchical_query
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.3'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.3'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: sqlite3
85
99
  requirement: !ruby/object:Gem::Requirement