isomorfeus-policy 1.0.0.zeta25 → 2.0.0.rc1

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: fde504baef9ce57e8878d9bc77a7884826c3c91694548e36d197d4683170be67
4
- data.tar.gz: 410ba9bfb94cf9a89c972e50075ece84787cf064852ff97cf292a9e0ece634cc
3
+ metadata.gz: 9c5d355e7df96c7e5721694a785f1de788d8e13680f7d620f1db485d7cda8da7
4
+ data.tar.gz: be369be41b9710cd0a8bb0815dcc664b4fcc1c7ae797c0a688e19d6303f0ce3c
5
5
  SHA512:
6
- metadata.gz: 38ff1582b18f5f52d2d3e117cf22d017bd2282d67ce1f059b63230babdb33cbbe734f4a1daa29ef73b61d4353847b7da17c04b69dcf5f7d79cc8d41e3914ef4c
7
- data.tar.gz: 67b67ca8f309a24592f3ed7344ddfdc48a507ce21c93af486e2c66d1de3b3c943a07add6b4c41c7e0a4f6839b24d484ec87e67ba5089dd300c28e91ceb424a20
6
+ metadata.gz: 5f59fb533b9674108b739369507b49cc54e59f231e97396998a8a856e71e18367f04751d6107674b5bdee5ceb78e050801398b20a4d98fa2f99da55e3a38446f
7
+ data.tar.gz: 1585c5f5ed37f391d2c94f37e90832d743f7b35acf2cedd41b2fd015fa8ac45a17357ec5e2dba66ab6df244794be8a0ebb2c82b01f94e6c4fbabeaa457b19975
data/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2018 Jan Biedermann
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Jan Biedermann
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,182 +1,181 @@
1
- # isomorfeus-policy
2
-
3
- Policy for Isomorfeus
4
-
5
-
6
- ### Community and Support
7
- At the [Isomorfeus Framework Project](http://isomorfeus.com)
8
-
9
- ## Usage
10
-
11
- Policy is enforced on the server, however, the same policy rules are also available on the client to allow for making consistent decisions everywhere.
12
-
13
- Everything that is not explicitly allowed somewhere is denied.
14
-
15
- Place the policy files in your projects `isomorfeus/policies`.
16
-
17
- Any class that would like to authorize for accessing a resource needs to include the `LucidAuthorization::Mixin`
18
- or inherit from `LucidAuthorization::Base`. Example:
19
-
20
- ```ruby
21
- class MyUser
22
- include LucdiAuthorization::Mixin
23
- end
24
- ```
25
- Any instance of that class then has the following methods available:
26
- - `authorized?(target_class, method_name, props)` - returning true or false
27
- - `authorized!(target_class, method_name, props)` - raising a exception if access is denied, otherwise returning true
28
-
29
- These methods, when called, look for a Policy class. The Policy class must be named after the user class plus the word 'Policy'.
30
- Example:
31
-
32
- For a class `MyUser` the policy class must be `MyUserPolicy`.
33
-
34
- ### Simple Rules
35
- Example Policy:
36
- ```ruby
37
- class MyUserPolicy < LucidPolicy::Base
38
- # allow access to all methods of a class
39
- allow BlaBlaGraph
40
- # class names can be given as strings which benefits autoload performance as the class can be loaded later on
41
- allow 'BlaBlaGraph'
42
-
43
- # allow access to all methods of multiple classes
44
- allow BlaBlaGraph, BlaComposition
45
-
46
- # allow access to a single method of a class
47
- allow BlaBlaGraph, :load
48
-
49
- # or allow multiple methods of a class
50
- allow BlaBlaGraph, :load, :save
51
-
52
- # deny access to all methods of multiple classes
53
- deny BlaGraph, SuperOperation
54
-
55
- deny others # or: allow others
56
-
57
- # in a otherwise empty policy the following can be used too:
58
- # allow all
59
- # deny all
60
-
61
- # further conditions can be used
62
- allow BlaBlaGraph, :member_feature, only_if: :registered?
63
- # this will call the method registered? on the user instance. The method must return a boolean.
64
- # permission is granted if the method returned true
65
- # method name must be given as symbol
66
- # other versions:
67
- allow BlaBlaGraph, :member_feature, if: :registered?
68
-
69
- allow BlaBlaGraph, :public_feature, only_if_not: :registered?
70
- # this will call the method registered? on the user instance. The method must return a boolean.
71
- # permission is granted if the method returned false
72
- # method name must be given as symbol
73
- # other versions:
74
- allow BlaBlaGraph, :member_feature, only_unless: :registered?
75
- allow BlaBlaGraph, :member_feature, unless: :registered?
76
- allow BlaBlaGraph, :member_feature, if_not: :registered?
77
-
78
- # a block can be passed directly to a rules condition
79
- allow BlaBlaGraph, :member_feature, if: proc { |user, props| user.registered? }
80
- # permission is granted if the block returns true
81
-
82
- # similar for deny, though:
83
- deny BlaBlaGraph, :member_feature, if: proc { |user, props| !user.registered? }
84
- # permission is denied if the block returns true
85
- end
86
- ```
87
- and then any of:
88
- ```ruby
89
- user.authorized?(target_class)
90
- user.authorized?(target_class, target_method)
91
- user.authorized?(target_class, target_method, *props)
92
- ```
93
- or:
94
- ```ruby
95
- user.authorized!(target_class)
96
- user.authorized!(target_class, target_method)
97
- user.authorized!(target_class, target_method, *props)
98
- ```
99
- which will raise a LucidPolicy::Exception unless authorized
100
-
101
- ### Custom Rules
102
- Besides calling methods or executing blocks from allow or deny, custom rules can be defined. Example:
103
- ```ruby
104
- class MyUserPolicy < LucidPolicy::Base
105
- rule BlaGraph, :load, :count do |user, target_class_name, target_method, props|
106
- allow if user.verified?
107
- allow if user.admin?
108
- deny
109
- end
110
- end
111
- ```
112
- Within the rule block the `allow` and `deny` methods must be used to allow or deny access.
113
- They accept no arguments. Within the block the default is to deny, so any matching allow wins.
114
-
115
- ### Combining Policies
116
- Policies can be combined. Across policies, the first Policy rule that permits access wins.
117
- The local policy is considered first, then the other policies.
118
- If the local policy allows, then the other policies are not considered.
119
- If the local policy has a `allow all` or a `allow others` rule, then there is a good chance the other policies are never considered.
120
- The recommended default rule for combined policies is `deny others`.
121
-
122
- Given a:
123
- ```ruby
124
- class AdminRolePolicy < LucidPolicy::Base
125
- rule BlaGraph, :load, :count do |user, target_class_name, target_method, props|
126
- allow if user.verified?
127
- deny
128
- end
129
- end
130
- ```
131
- another policy can include the rules. Example:
132
- ```ruby
133
- class MyUserPolicy < LucidPolicy::Base
134
- combine_with AdminRolePolicy
135
-
136
- # conditions as for allow and deny can be used too
137
- combine_with AdminRolePolicy, if: :admin?
138
- # this will call the method admin? on the user instance. The method must return a boolean.
139
- # this will execute the AdminRolePolicy rules only if the method returned true
140
- # method name must be given as symbol
141
-
142
- combine_with AdminRolePolicy, if_not: :normal_guy?
143
- # this will call the method normal_guy?? on the user instance. The method must return a boolean.
144
- # this will execute the AdminRolePolicy rules only if the method returned false
145
- # method name must be given as symbol
146
- # other versions:
147
- combine_with AdminRolePolicy, unless: :normal_guy?
148
-
149
- # a block can be passed directly to a rules condition
150
- combine_with AdminRolePolicy, if: proc { |user| user.admin? }
151
- # this will execute the AdminRolePolicy rules only if the condition block returns true
152
-
153
- deny others
154
- end
155
- ```
156
- ### Debugging Policies or finding out the winning rule
157
- Its possible to start recording the reason for a authorization result:
158
- ```ruby
159
- my_user.record_authorization_reason
160
- ```
161
- When then authorizing:
162
- ```ruby
163
- my_user.authorized?(BlaGraph, :load)
164
- ```
165
- the reason for access or denied access, the winning rule, can be inspected:
166
- ```ruby
167
- my_user.authozation_reason
168
- ```
169
-
170
- It will be a Hash and show the responsible policy class, condition, condition result, etc. Example:
171
- ```ruby
172
- { combined:
173
- { class_name: "Resource",
174
- others: :deny,
175
- policy_class: "CombinedPolicy" },
176
- policy_class: "UserPolicy" }
177
- ```
178
-
179
- Recording can be stopped again, for better performance:
180
- ```ruby
181
- my_user.stop_to_record_authorization_reason
182
- ```
1
+ # isomorfeus-policy
2
+
3
+ Policy for Isomorfeus
4
+
5
+ ### Community and Support
6
+ At the [Isomorfeus Framework Project](http://isomorfeus.com)
7
+
8
+ ## Usage
9
+
10
+ Policy is enforced on the server, however, the same policy rules are also available on the client to allow for making consistent decisions everywhere.
11
+
12
+ Everything that is not explicitly allowed somewhere is denied.
13
+
14
+ Place the policy files in your projects `app/policies` directory.
15
+
16
+ Any class that would like to authorize for accessing a resource needs to include the `LucidAuthorization::Mixin`
17
+ or inherit from `LucidAuthorization::Base`. Example:
18
+
19
+ ```ruby
20
+ class MyUser
21
+ include LucdiAuthorization::Mixin
22
+ end
23
+ ```
24
+ Any instance of that class then has the following methods available:
25
+ - `authorized?(target_class, method_name, props)` - returning true or false
26
+ - `authorized!(target_class, method_name, props)` - raising a exception if access is denied, otherwise returning true
27
+
28
+ These methods, when called, look for a Policy class. The Policy class must be named after the user class plus the word 'Policy'.
29
+ Example:
30
+
31
+ For a class `MyUser` the policy class must be `MyUserPolicy`.
32
+
33
+ ### Simple Rules
34
+ Example Policy:
35
+ ```ruby
36
+ class MyUserPolicy < LucidPolicy::Base
37
+ # allow access to all methods of a class
38
+ allow BlaBlaGraph
39
+ # class names can be given as strings which benefits autoload performance as the class can be loaded later on
40
+ allow 'BlaBlaGraph'
41
+
42
+ # allow access to all methods of multiple classes
43
+ allow BlaBlaGraph, BlaComposition
44
+
45
+ # allow access to a single method of a class
46
+ allow BlaBlaGraph, :load
47
+
48
+ # or allow multiple methods of a class
49
+ allow BlaBlaGraph, :load, :save
50
+
51
+ # deny access to all methods of multiple classes
52
+ deny BlaGraph, SuperOperation
53
+
54
+ deny others # or: allow others
55
+
56
+ # in a otherwise empty policy the following can be used too:
57
+ # allow all
58
+ # deny all
59
+
60
+ # further conditions can be used
61
+ allow BlaBlaGraph, :member_feature, only_if: :registered?
62
+ # this will call the method registered? on the user instance. The method must return a boolean.
63
+ # permission is granted if the method returned true
64
+ # method name must be given as symbol
65
+ # other versions:
66
+ allow BlaBlaGraph, :member_feature, if: :registered?
67
+
68
+ allow BlaBlaGraph, :public_feature, only_if_not: :registered?
69
+ # this will call the method registered? on the user instance. The method must return a boolean.
70
+ # permission is granted if the method returned false
71
+ # method name must be given as symbol
72
+ # other versions:
73
+ allow BlaBlaGraph, :member_feature, only_unless: :registered?
74
+ allow BlaBlaGraph, :member_feature, unless: :registered?
75
+ allow BlaBlaGraph, :member_feature, if_not: :registered?
76
+
77
+ # a proc can be passed directly to a rules condition
78
+ allow BlaBlaGraph, :member_feature, if: proc { |user, props| user.registered? }
79
+ # permission is granted if the block returns true
80
+
81
+ # similar for deny, though:
82
+ deny BlaBlaGraph, :member_feature, if: proc { |user, props| !user.registered? }
83
+ # permission is denied if the block returns true
84
+ end
85
+ ```
86
+ and then any of:
87
+ ```ruby
88
+ user.authorized?(target_class)
89
+ user.authorized?(target_class, target_method)
90
+ user.authorized?(target_class, target_method, *props)
91
+ ```
92
+ or:
93
+ ```ruby
94
+ user.authorized!(target_class)
95
+ user.authorized!(target_class, target_method)
96
+ user.authorized!(target_class, target_method, *props)
97
+ ```
98
+ which will raise a LucidPolicy::Exception unless authorized
99
+
100
+ ### Custom Rules
101
+ Besides calling methods or executing blocks from allow or deny, custom rules can be defined. Example:
102
+ ```ruby
103
+ class MyUserPolicy < LucidPolicy::Base
104
+ rule BlaGraph, :load, :count do |user, target_class_name, target_method, props|
105
+ allow if user.verified?
106
+ allow if user.admin?
107
+ deny
108
+ end
109
+ end
110
+ ```
111
+ Within the rule block the `allow` and `deny` methods must be used to allow or deny access.
112
+ They accept no arguments. Within the block the default is to deny, so any matching allow wins.
113
+
114
+ ### Combining Policies
115
+ Policies can be combined. Across policies, the first Policy rule that permits access wins.
116
+ The outer policy is considered first, then the other policies.
117
+ If the outer policy allows, then the other policies are not considered.
118
+ If the outer policy has a `allow all` or a `allow others` rule, then there is a good chance the other policies are never considered.
119
+ The recommended default rule for combined policies is `deny others`.
120
+
121
+ Given a:
122
+ ```ruby
123
+ class AdminRolePolicy < LucidPolicy::Base
124
+ rule BlaGraph, :load, :count do |user, target_class_name, target_method, props|
125
+ allow if user.verified?
126
+ deny
127
+ end
128
+ end
129
+ ```
130
+ another policy can include the rules. Example:
131
+ ```ruby
132
+ class MyUserPolicy < LucidPolicy::Base
133
+ combine_with AdminRolePolicy
134
+
135
+ # conditions as for allow and deny can be used too
136
+ combine_with AdminRolePolicy, if: :admin?
137
+ # this will call the method admin? on the user instance. The method must return a boolean.
138
+ # this will execute the AdminRolePolicy rules only if the method returned true
139
+ # method name must be given as symbol
140
+
141
+ combine_with AdminRolePolicy, if_not: :normal_guy?
142
+ # this will call the method normal_guy?? on the user instance. The method must return a boolean.
143
+ # this will execute the AdminRolePolicy rules only if the method returned false
144
+ # method name must be given as symbol
145
+ # other versions:
146
+ combine_with AdminRolePolicy, unless: :normal_guy?
147
+
148
+ # a block can be passed directly to a rules condition
149
+ combine_with AdminRolePolicy, if: proc { |user| user.admin? }
150
+ # this will execute the AdminRolePolicy rules only if the condition block returns true
151
+
152
+ deny others
153
+ end
154
+ ```
155
+ ### Debugging Policies or finding out the winning rule
156
+ Its possible to start recording the reason for a authorization result:
157
+ ```ruby
158
+ my_user.record_authorization_reason
159
+ ```
160
+ When then authorizing:
161
+ ```ruby
162
+ my_user.authorized?(BlaGraph, :load)
163
+ ```
164
+ the reason for access or denied access, the winning rule, can be inspected:
165
+ ```ruby
166
+ my_user.authozation_reason
167
+ ```
168
+
169
+ It will be a Hash and show the responsible policy class, condition, condition result, etc. Example:
170
+ ```ruby
171
+ { combined:
172
+ { class_name: "Resource",
173
+ others: :deny,
174
+ policy_class: "CombinedPolicy" },
175
+ policy_class: "UserPolicy" }
176
+ ```
177
+
178
+ Recording can be stopped again, for better performance:
179
+ ```ruby
180
+ my_user.stop_to_record_authorization_reason
181
+ ```
@@ -1,36 +1,36 @@
1
- module Isomorfeus
2
- class << self
3
- def cached_policy_classes
4
- @cached_array_classes ||= {}
5
- end
6
-
7
- if RUBY_ENGINE == 'opal'
8
- def cached_policy_class(class_name)
9
- return "::#{class_name}".constantize if Isomorfeus.development?
10
- return cached_policy_classes[class_name] if cached_policy_classes.key?(class_name)
11
- cached_policy_classes[class_name] = "::#{class_name}".constantize
12
- end
13
- else
14
- def cached_policy_class(class_name)
15
- return nil unless valid_policy_class_name?(class_name)
16
- return "::#{class_name}".constantize if Isomorfeus.development?
17
- return cached_policy_classes[class_name] if cached_policy_classes.key?(class_name)
18
- cached_policy_classes[class_name] = "::#{class_name}".constantize
19
- end
20
-
21
- def valid_policy_class_names
22
- @valid_policy_class_names ||= Set.new
23
- end
24
-
25
- def valid_policy_class_name?(class_name)
26
- valid_policy_class_names.include?(class_name)
27
- end
28
-
29
- def add_valid_policy_class(klass)
30
- class_name = klass.name
31
- class_name = class_name.split('>::').last if class_name.start_with?('#<')
32
- valid_policy_class_names << class_name
33
- end
34
- end
35
- end
36
- end
1
+ module Isomorfeus
2
+ class << self
3
+ def cached_policy_classes
4
+ @cached_array_classes ||= {}
5
+ end
6
+
7
+ if RUBY_ENGINE == 'opal'
8
+ def cached_policy_class(class_name)
9
+ return "::#{class_name}".constantize if Isomorfeus.development?
10
+ return cached_policy_classes[class_name] if cached_policy_classes.key?(class_name)
11
+ cached_policy_classes[class_name] = "::#{class_name}".constantize
12
+ end
13
+ else
14
+ def cached_policy_class(class_name)
15
+ return nil unless valid_policy_class_name?(class_name)
16
+ return "::#{class_name}".constantize if Isomorfeus.development?
17
+ return cached_policy_classes[class_name] if cached_policy_classes.key?(class_name)
18
+ cached_policy_classes[class_name] = "::#{class_name}".constantize
19
+ end
20
+
21
+ def valid_policy_class_names
22
+ @valid_policy_class_names ||= Set.new
23
+ end
24
+
25
+ def valid_policy_class_name?(class_name)
26
+ valid_policy_class_names.include?(class_name)
27
+ end
28
+
29
+ def add_valid_policy_class(klass)
30
+ class_name = klass.name
31
+ class_name = class_name.split('>::').last if class_name.start_with?('#<')
32
+ valid_policy_class_names << class_name
33
+ end
34
+ end
35
+ end
36
+ end
@@ -1,5 +1,5 @@
1
- module Isomorfeus
2
- module Policy
3
- VERSION = '1.0.0.zeta25'
4
- end
5
- end
1
+ module Isomorfeus
2
+ module Policy
3
+ VERSION = '2.0.0.rc1'
4
+ end
5
+ end
@@ -1,21 +1,22 @@
1
- require 'isomorfeus-react'
2
- require 'isomorfeus/policy/config'
3
- require 'lucid_props'
4
-
5
- if RUBY_ENGINE == 'opal'
6
- Isomorfeus.zeitwerk.push_dir('isomorfeus_policy')
7
- require_tree 'isomorfeus_policy', :autoload
8
- Isomorfeus.zeitwerk.push_dir('policies')
9
- else
10
- require 'isomorfeus_policy/lucid_policy/exception'
11
- require 'isomorfeus_policy/lucid_policy/helper'
12
- require 'isomorfeus_policy/lucid_policy/mixin'
13
- require 'isomorfeus_policy/lucid_policy/base'
14
- require 'isomorfeus_policy/lucid_authorization/mixin'
15
- require 'isomorfeus_policy/lucid_authorization/base'
16
- require 'isomorfeus_policy/anonymous'
17
-
18
- Opal.append_path(__dir__.untaint) unless Opal.paths.include?(__dir__.untaint)
19
- path = File.expand_path(File.join('app', 'policies'))
20
- Isomorfeus.zeitwerk.push_dir(path)
21
- end
1
+ require 'isomorfeus-preact'
2
+ require 'isomorfeus/policy/config'
3
+ require 'lucid_props'
4
+
5
+ if RUBY_ENGINE == 'opal'
6
+ Isomorfeus.zeitwerk.push_dir('isomorfeus_policy')
7
+ require_tree 'isomorfeus_policy', autoload: true
8
+ Isomorfeus.zeitwerk.push_dir('policies')
9
+ else
10
+ require 'isomorfeus_policy/lucid_policy/exception'
11
+ require 'isomorfeus_policy/lucid_policy/helper'
12
+ require 'isomorfeus_policy/lucid_policy/mixin'
13
+ require 'isomorfeus_policy/lucid_policy/base'
14
+ require 'isomorfeus_policy/lucid_authorization/mixin'
15
+ require 'isomorfeus_policy/lucid_authorization/base'
16
+ require 'isomorfeus_policy/anonymous'
17
+ require 'iso_opal'
18
+
19
+ Opal.append_path(__dir__.untaint) unless IsoOpal.paths_include?(__dir__.untaint)
20
+ path = File.expand_path(File.join('app', 'policies'))
21
+ Isomorfeus.zeitwerk.push_dir(path) if Dir.exist?(path)
22
+ end
@@ -1,11 +1,11 @@
1
- class Anonymous
2
- include LucidAuthorization::Mixin
3
-
4
- def anonymous?
5
- true
6
- end
7
-
8
- def key
9
- 'anonymous'
10
- end
11
- end
1
+ class Anonymous
2
+ include LucidAuthorization::Mixin
3
+
4
+ def anonymous?
5
+ true
6
+ end
7
+
8
+ def key
9
+ 'anonymous'
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
- module LucidAuthorization
2
- class Base
3
- include LucidAuthorization::Mixin
4
- end
5
- end
1
+ module LucidAuthorization
2
+ class Base
3
+ include LucidAuthorization::Mixin
4
+ end
5
+ end