thecore_auth_commons 2.3.6 → 2.3.7
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 +4 -4
- data/db/seeds.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 50b41bd961e584ec0ec2aa0e47ac5d7ec17671c7f523559dd928c4cc76e9694e
|
|
4
|
+
data.tar.gz: fe1566aeab26f20fd8194cf49017536c4cfde26ac6ef7c2dcc45bef544db2fd5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c2a6cfbd265adbc2f8e3e6293b02bf7ef06e69b092f33db4e89a7b4ee4bf525d8dd8c4c35172b64f84e8238c00a77e3368093c2c427d71ae5a349af9363c5652
|
|
7
|
+
data.tar.gz: a99b60ded5a87765de4a2a03d570de6d13463d8b7d7d81593ac42ca8da89317d2b548b15fba34a495b7614f8e79a28180f3c1d7da26b5f3cccb57380e72ce46e
|
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: self.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],
|
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.
|
|
4
|
+
version: 2.3.7
|
|
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-
|
|
11
|
+
date: 2021-06-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|