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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9fcb9d4217719b4cf883630148626b1a212bdd1512bec4c3aa7a6584abc1a253
4
- data.tar.gz: db0ae794f2c1f4ff8de5e896ab806193d2c7ce1e0f3c5d1e24c920f35b8cd9d2
3
+ metadata.gz: a5e0c43b3255ca7302f7bb6a855629bcda16adf72c4db4f0eeeb6384d8523bde
4
+ data.tar.gz: c245120f9e4ed84752f57d886fdf3e5e00ccf6cf16f629759fc4e7a92fc3a283
5
5
  SHA512:
6
- metadata.gz: 2a262801ae054590fd97e3335604ccec397537bd04c04474b2d73ae39a5311c28bff4ef8f72e6b3eddda20801b9b3a97f5eebdc46c7c1ce30d48ecf2f3d9e8cf
7
- data.tar.gz: 03ce10d91f332d48af7bf3686baed86b8bcbdce48d9127c4c8b50716dd9fbb4bd48c22284f1c387296c68ba0f59404c4cf4de0cee54d52407545051be068173d
6
+ metadata.gz: 27503b634d4aea468dfad36e8cea8832b62a7dd34521b928559cb0ea462e16ece334874db721ffeab0bd7ca8290e82855b2d20d2d22cb40278fae525571c2a22
7
+ data.tar.gz: 0ad42e55373b208dcfc3076bc070810ef26c82711cfcd3a085a89ca9b89571aff3412b83ee241ae2edb1216f2ee0ef3ff5a1a2bf6910c7c140aa353749e12707
@@ -1,6 +1,6 @@
1
1
  module AtomicAdmin::Api::Admin::V0
2
2
  class AuthenticatingApplicationController < ActionController::API
3
- include RequireJwtToken
3
+ include AtomicAdmin::RequireJwtToken
4
4
  before_action :validate_internal_token
5
5
  end
6
6
  end
@@ -1,6 +1,6 @@
1
1
  module AtomicAdmin::V1
2
2
  class AdminController < ActionController::API
3
- include RequireJwtToken
3
+ include AtomicAdmin::RequireJwtToken
4
4
 
5
5
  before_action :validate_admin_token
6
6
 
@@ -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 authorization header found" if header.nil?
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
@@ -1,3 +1,3 @@
1
1
  module AtomicAdmin
2
- VERSION = "2.1.2".freeze
2
+ VERSION = "2.2.0".freeze
3
3
  end
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.1.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-07-30 00:00:00.000000000 Z
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.5.22
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