uc3-dmp-rds 0.0.19 → 0.0.22

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: 8c7dc9613b8b085518716b38449b3855839b813d28083fbd2c313eae06513604
4
- data.tar.gz: def9b1adf267154ee846e3c9a66b465e6f7f0b3e02c7d6c8845542d4f5f36d0c
3
+ metadata.gz: f01cded7a449d6914fdcb27114cc5538954a7a7befcaad5f0233d4bb9c490430
4
+ data.tar.gz: da26678250bac51789568e9a7dc08cdb02eb957d2c25a733790470ffbb0e8ee3
5
5
  SHA512:
6
- metadata.gz: be45489cb244cff9f7e2e5c7094b393a21006708f2e8276ae64ae4894a8fc9ddf6a2cf0b44a58064065f5b9da963ba5bb0f1068213d12b565f321da76a655f09
7
- data.tar.gz: 3d9977589dea3a7d13180221f9ddd3fc6413ceb21e6f210fc1cc944a5103023c165a6058422d91330f2c08238dcf7560028259f17d3910656e38854a476768d4
6
+ metadata.gz: 3d468a1782f1463626d538c43165b89fe2894fb7c0891ccc211ae9309fc3494ba272e71d4604d6f4b74a3deb6387a9138821a653a95b96e686f7ec40164882f1
7
+ data.tar.gz: b65f521adda86f98a2656eae5dcbbfc14ed7407d9d696c419dd6f485a76afb9e7388f34b2a65815f94fc4910b4e6ac4aeefeed404aaa512cb5f48b51f9d73693
@@ -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,6 +58,7 @@ 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
64
  admin: !user['perm'].nil?,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpRds
4
- VERSION = '0.0.19'
4
+ VERSION = '0.0.22'
5
5
  end
data/lib/uc3-dmp-rds.rb CHANGED
@@ -7,5 +7,6 @@ require 'uc3-dmp-rds/authenticator'
7
7
  # RDS Database adapter
8
8
  module Uc3DmpRds
9
9
  MSG_MISSING_TOKEN = 'Missing API Token. Expected header: `Authorization: token 12345`'
10
+ MSG_MISSING_USER = 'Unknown or unauthenticated user'
10
11
  end
11
12
  # rubocop:enable Naming/FileName
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-rds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-26 00:00:00.000000000 Z
11
+ date: 2023-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_record_simple_execute