lib/lockdown/rules.rb in lockdown-1.3.0 vs lib/lockdown/rules.rb in lockdown-1.3.1

- old
+ new

@@ -1,8 +1,6 @@ module Lockdown - class InvalidRuleAssignment < StandardError; end - module Rules attr_accessor :options attr_accessor :permissions attr_accessor :user_groups @@ -56,11 +54,11 @@ perm = find_permission_object(perm_symbol) if perm perm.set_as_public_access else msg = "Permission not found: #{perm_symbol}" - raise InvalidRuleAssigment, msg + raise Lockdown::InvalidRuleAssignment, msg end end end # Defines protected access by the permission symbols @@ -73,11 +71,11 @@ perm = find_permission_object(perm_symbol) if perm perm.set_as_protected_access else msg = "Permission not found: #{perm_symbol}" - raise InvalidRuleAssigment, msg + raise Lockdown::InvalidRuleAssignment, msg end end end # Define a user groups by name and permission symbol(s) @@ -288,10 +286,10 @@ def validate_user_groups user_groups.each do |user_group, perms| perms.each do |perm| unless permission_exists?(perm) msg ="User Group: #{user_group}, permission not found: #{perm}" - raise InvalidRuleAssignment, msg + raise Lockdown::InvalidRuleAssignment, msg end end end end