active_admin_basic_authorization_adapter 0.0.3 → 0.0.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ead1a66bd640d3fd53a109487bad15c3bfea98825ea44d43240608e238d18886
|
|
4
|
+
data.tar.gz: b0fe2cc328b4e1eb8c2949413282205e3237be73c1a7aef3c972f11b2feb9402
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 158892e8e3b17ff2da3562085ef7d1ef2c1ac7f2d0a94ca4c381072aa3b8554104976ddecc2ac2236584b05f9abae8a358372d200e5be29b6c5e82b801d33468
|
|
7
|
+
data.tar.gz: e5ab805c1fc2ad86a9a3e3e9eecbe5a497305aba64d5a20d946461cef7ec1c4a7b8d16719fb686f950fb341c1ed771adacc5c836523231c8590a737962d6045d
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# require 'active_admin'
|
|
4
|
+
# require 'active_admin/page'
|
|
5
|
+
require 'active_admin/authorization_adapter'
|
|
6
|
+
|
|
3
7
|
class ActiveAdminBasicAuthorizationAdapter < ActiveAdmin::AuthorizationAdapter
|
|
4
8
|
def authorized?(action, subject = nil)
|
|
5
9
|
return unless should_ask_authorization(subject)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
class BasicAdminAuthorizationGenerator < Rails::Generators::NamedBase
|
|
4
4
|
source_root File.expand_path('templates', __dir__)
|
|
5
|
-
class_option :admin_type, type: :string, desc: 'Admin type', default: false
|
|
5
|
+
class_option :admin_type, type: :string, desc: 'Admin type', default: 'false'
|
|
6
6
|
|
|
7
7
|
def create_authorizations_file
|
|
8
8
|
authorization = options[:admin_type]
|