Class: Coalla::DefaultPolicy
- Inherits:
-
Object
- Object
- Coalla::DefaultPolicy
- Defined in:
- lib/coalla/builders/policy.rb
Instance Method Summary collapse
- #action_enabled?(action, options = {}) ⇒ Boolean
- #field_enabled?(field, options = {}) ⇒ Boolean
-
#initialize(context) ⇒ DefaultPolicy
constructor
A new instance of DefaultPolicy.
- #sanitize_params(params, options = {}) ⇒ Object
- #section_enabled?(section, options = {}) ⇒ Boolean
Constructor Details
#initialize(context) ⇒ DefaultPolicy
Returns a new instance of DefaultPolicy.
3 4 5 |
# File 'lib/coalla/builders/policy.rb', line 3 def initialize(context) @context = context end |
Instance Method Details
#action_enabled?(action, options = {}) ⇒ Boolean
7 8 9 |
# File 'lib/coalla/builders/policy.rb', line 7 def action_enabled?(action, = {}) return true end |
#field_enabled?(field, options = {}) ⇒ Boolean
11 12 13 |
# File 'lib/coalla/builders/policy.rb', line 11 def field_enabled?(field, = {}) return true end |
#sanitize_params(params, options = {}) ⇒ Object
19 20 21 |
# File 'lib/coalla/builders/policy.rb', line 19 def sanitize_params(params, = {}) return params end |
#section_enabled?(section, options = {}) ⇒ Boolean
15 16 17 |
# File 'lib/coalla/builders/policy.rb', line 15 def section_enabled?(section, = {}) return true end |