uc3-dmp-rds 0.0.18 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-rds/authenticator.rb +4 -2
- data/lib/uc3-dmp-rds/version.rb +1 -1
- data/lib/uc3-dmp-rds.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 556a5c27b265c712a98fc858b989731699df14085366ed2c6d34ab2cab96764f
|
4
|
+
data.tar.gz: 97c6eca72baa2f61d14af830b27e2f712bd345f8987b14e806413c3d57aa8e7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3abd42f8fa4240b227fada42f88ea80b334cba106038ec0b188f59a0eae1846b3be21290bfb99a2279eb53ae09dbb59f9fb84a34a8a4d9a84ced15e3136b7213
|
7
|
+
data.tar.gz: 25ff9c28b1c097aacefa95692b0a4614ee9c7045c001b71e2330990e371ec6649be8cd9389387da90a7b28832870a9ac1646c571d737279e7eda3d0408c49170
|
@@ -36,7 +36,7 @@ module Uc3DmpRds
|
|
36
36
|
return nil if token.nil?
|
37
37
|
|
38
38
|
sql = <<~SQL.squish
|
39
|
-
SELECT users.firstname, users.surname, users.email, users.active, i.value orcid,
|
39
|
+
SELECT users.id, users.firstname, users.surname, users.email, users.active, i.value orcid,
|
40
40
|
orgs.name org_name, ro.name ror_name, ro.ror_id,
|
41
41
|
(SELECT perms.name FROM users_perms up LEFT OUTER JOIN perms ON up.perm_id = perms.id
|
42
42
|
WHERE users.id = up.user_id AND perms.name = 'modify_templates') perm
|
@@ -58,9 +58,11 @@ module Uc3DmpRds
|
|
58
58
|
return {} if user.nil? || user['email'].nil?
|
59
59
|
|
60
60
|
hash = {
|
61
|
+
id: user.id,
|
61
62
|
name: [user['surname'], user['firstname']].join(', '),
|
62
63
|
mbox: user['email'],
|
63
|
-
admin: !user['perm'].nil
|
64
|
+
admin: !user['perm'].nil?,
|
65
|
+
active: user.fetch('active', false)
|
64
66
|
}
|
65
67
|
hash[:user_id] = { type: 'orcid', identifier: user['orcid'] } unless user['orcid'].nil?
|
66
68
|
return hash if user['org_name'].nil?
|
data/lib/uc3-dmp-rds/version.rb
CHANGED
data/lib/uc3-dmp-rds.rb
CHANGED