Class: MkAcl::Generator::Rules
- Inherits:
-
Object
- Object
- MkAcl::Generator::Rules
- Defined in:
- lib/mikras_utils/mkacl/generators/rules.rb
Overview
Generate a select, update, and delete rule for each table. Create rules are implemented as triggers and delete should probably also be. The problem is that a record that fails the rule check is silently ignored which is probably not what you want
The roles matches an acl_* array against a role action entry in the spec file. The acl_* arrays are themselves array of role ids. Each subarray is indexed using the order in the acl.spec file
This is not the optimal solution because it makes both data and code more complex. An alternative would be to unify the roles id of all rules in an action and then let a trigger take case of ‘check’ and ‘field’ checks
Instance Attribute Summary collapse
-
#generator ⇒ Object
readonly
Returns the value of attribute generator.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(generator) ⇒ Rules
constructor
A new instance of Rules.
Constructor Details
#initialize(generator) ⇒ Rules
23 24 25 |
# File 'lib/mikras_utils/mkacl/generators/rules.rb', line 23 def initialize(generator) @generator = generator end |
Instance Attribute Details
#generator ⇒ Object (readonly)
Returns the value of attribute generator.
20 21 22 |
# File 'lib/mikras_utils/mkacl/generators/rules.rb', line 20 def generator @generator end |
Instance Method Details
#generate ⇒ Object
27 28 29 30 |
# File 'lib/mikras_utils/mkacl/generators/rules.rb', line 27 def generate generate_rules generate_rule_functions end |