atomic_admin 2.1.2 → 2.2.0
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/app/controllers/atomic_admin/api/admin/v0/authenticating_application_controller.rb +1 -1
- data/app/controllers/atomic_admin/v1/admin_controller.rb +1 -1
- data/app/controllers/concerns/{require_jwt_token.rb → atomic_admin/require_jwt_token.rb} +4 -2
- data/lib/atomic_admin/interaction/base.rb +4 -2
- data/lib/atomic_admin/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5e0c43b3255ca7302f7bb6a855629bcda16adf72c4db4f0eeeb6384d8523bde
|
|
4
|
+
data.tar.gz: c245120f9e4ed84752f57d886fdf3e5e00ccf6cf16f629759fc4e7a92fc3a283
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27503b634d4aea468dfad36e8cea8832b62a7dd34521b928559cb0ea462e16ece334874db721ffeab0bd7ca8290e82855b2d20d2d22cb40278fae525571c2a22
|
|
7
|
+
data.tar.gz: 0ad42e55373b208dcfc3076bc070810ef26c82711cfcd3a085a89ca9b89571aff3412b83ee241ae2edb1216f2ee0ef3ff5a1a2bf6910c7c140aa353749e12707
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module RequireJwtToken
|
|
1
|
+
module AtomicAdmin::RequireJwtToken
|
|
2
2
|
extend ActiveSupport::Concern
|
|
3
3
|
|
|
4
4
|
protected
|
|
@@ -8,6 +8,7 @@ module RequireJwtToken
|
|
|
8
8
|
decoder = AtomicAdmin::JwtToken::JwksDecoder.new(AtomicAdmin.admin_jwks_url)
|
|
9
9
|
token = decoder.decode(encoded_token)&.first
|
|
10
10
|
validate_claims!(token)
|
|
11
|
+
@atomic_admin_token = token
|
|
11
12
|
token
|
|
12
13
|
|
|
13
14
|
rescue JWT::DecodeError, AtomicAdmin::JwtToken::InvalidTokenError => e
|
|
@@ -39,9 +40,10 @@ module RequireJwtToken
|
|
|
39
40
|
|
|
40
41
|
def get_encoded_token(req)
|
|
41
42
|
return req.params[:jwt] if req.params[:jwt]
|
|
43
|
+
return req.params[:authorization] if req.params[:authorization]
|
|
42
44
|
|
|
43
45
|
header = req.headers["Authorization"] || req.headers[:authorization]
|
|
44
|
-
raise AtomicAdmin::JwtToken::MissingTokenError, "No
|
|
46
|
+
raise AtomicAdmin::JwtToken::MissingTokenError, "No JWT field found" if header.nil?
|
|
45
47
|
|
|
46
48
|
token = header.split(" ").last
|
|
47
49
|
raise AtomicAdmin::JwtToken::MissingTokenError, "Invalid authorization header string" if token.nil?
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
module AtomicAdmin::Interaction
|
|
2
2
|
class Base
|
|
3
|
-
attr_accessor :key, :type, :key, :title, :icon, :order, :data
|
|
3
|
+
attr_accessor :key, :type, :key, :title, :icon, :order, :data, :permissions
|
|
4
4
|
|
|
5
|
-
def initialize(key:, type:, title: nil, icon: nil, order: 0, **kwargs)
|
|
5
|
+
def initialize(key:, type:, title: nil, icon: nil, order: 0, permissions: [], **kwargs)
|
|
6
6
|
@key = key
|
|
7
7
|
@type = type
|
|
8
8
|
@title = title
|
|
9
9
|
@icon = icon
|
|
10
10
|
@order = order
|
|
11
|
+
@permissions = permissions
|
|
11
12
|
@data = kwargs
|
|
12
13
|
end
|
|
13
14
|
|
|
@@ -17,6 +18,7 @@ module AtomicAdmin::Interaction
|
|
|
17
18
|
type: type,
|
|
18
19
|
title: title,
|
|
19
20
|
icon: icon,
|
|
21
|
+
permissions: permissions,
|
|
20
22
|
}
|
|
21
23
|
end
|
|
22
24
|
end
|
data/lib/atomic_admin/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: atomic_admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Benoit
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-
|
|
12
|
+
date: 2026-08-12 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|
|
@@ -128,7 +128,7 @@ files:
|
|
|
128
128
|
- app/controllers/atomic_admin/v1/tenant_deployments_controller.rb
|
|
129
129
|
- app/controllers/atomic_admin/v1/tenant_platform_guid_strategies_controller.rb
|
|
130
130
|
- app/controllers/atomic_admin/v1/users_controller.rb
|
|
131
|
-
- app/controllers/concerns/require_jwt_token.rb
|
|
131
|
+
- app/controllers/concerns/atomic_admin/require_jwt_token.rb
|
|
132
132
|
- app/jobs/atomic_admin/application_job.rb
|
|
133
133
|
- app/mailers/atomic_admin/application_mailer.rb
|
|
134
134
|
- app/models/atomic_admin/application_record.rb
|
|
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
180
180
|
- !ruby/object:Gem::Version
|
|
181
181
|
version: '0'
|
|
182
182
|
requirements: []
|
|
183
|
-
rubygems_version: 3.
|
|
183
|
+
rubygems_version: 3.4.10
|
|
184
184
|
signing_key:
|
|
185
185
|
specification_version: 4
|
|
186
186
|
summary: Engine to provide apis that power the Atomic Jolt admin app
|