magick-feature-flags 0.9.29 → 0.9.31
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/lib/magick/admin_ui/engine.rb +11 -4
- data/lib/magick/version.rb +1 -1
- 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: b0402a730af6ca869734deeddd446aa07e86bd54f3b05eeafbbc3d80dd741bbb
|
|
4
|
+
data.tar.gz: 340f12044c58457665cb6c0cb7a4d00e52475d1613463e282931381f7c39d5be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2de6d3ad8267b993ba5b3b2633359e9afa9a7d0dabd730585d3603a412c5b6dd57fef464061b10e61332ae1894df6bb31c559e5fc11b66fdca47eb9ec63a0bd5
|
|
7
|
+
data.tar.gz: ca3a298cd3cd12b4ccaf21776356ea46e7092ca8178e8096dadc526ec416b300006a3bf7c35be780a0c8629d0e662fcdf731f3110df2c4ddb9367c1fafcfcdbd
|
|
@@ -12,15 +12,22 @@ end
|
|
|
12
12
|
module Magick
|
|
13
13
|
module AdminUI
|
|
14
14
|
class Engine < ::Rails::Engine
|
|
15
|
-
isolate_namespace
|
|
15
|
+
# Removed isolate_namespace to prevent interference with Warden/Devise middleware
|
|
16
|
+
# isolate_namespace can create a separate middleware stack that breaks Warden authentication
|
|
17
|
+
# Instead, we'll rely on the namespace in routes and controllers to keep things organized
|
|
18
|
+
# isolate_namespace Magick::AdminUI
|
|
16
19
|
|
|
17
20
|
engine_name 'magick_admin_ui'
|
|
18
21
|
|
|
19
22
|
# Ensure the engine doesn't interfere with Warden/Devise middleware
|
|
20
23
|
# Rails engines by default inherit middleware from the main app, which is what we want
|
|
21
|
-
# We don't add any
|
|
24
|
+
# We explicitly don't add, modify, or override any middleware that could affect Warden/Devise
|
|
22
25
|
# The engine should work alongside existing authentication middleware without modification
|
|
23
26
|
|
|
27
|
+
# Critical: Don't add any middleware that could interfere with Warden/Devise
|
|
28
|
+
# The engine must use the main app's middleware stack to avoid breaking authentication
|
|
29
|
+
# Rails engines inherit middleware by default, so we don't need to do anything special
|
|
30
|
+
|
|
24
31
|
# Rails engines automatically detect app/views and app/controllers directories
|
|
25
32
|
# With isolate_namespace, views should be at:
|
|
26
33
|
# app/views/magick/adminui/[controller]/[action].html.erb
|
|
@@ -31,8 +38,8 @@ module Magick
|
|
|
31
38
|
config.autoload_paths += %W[#{root}/app/controllers] if root.join('app', 'controllers').exist?
|
|
32
39
|
|
|
33
40
|
# Explicitly require controllers early to ensure they're loaded when gem is from RubyGems
|
|
34
|
-
# This initializer runs
|
|
35
|
-
initializer 'magick.admin_ui.require_controllers',
|
|
41
|
+
# This initializer runs after Warden/Devise is set up to avoid interfering with authentication
|
|
42
|
+
initializer 'magick.admin_ui.require_controllers', after: :load_config_initializers do
|
|
36
43
|
engine_root = Magick::AdminUI::Engine.root
|
|
37
44
|
controller_path = engine_root.join('app', 'controllers', 'magick', 'adminui', 'features_controller.rb')
|
|
38
45
|
require controller_path.to_s if controller_path.exist?
|
data/lib/magick/version.rb
CHANGED