diff --git a/lib/access_control_permission_patch.rb b/lib/access_control_permission_patch.rb index 3c352eaf6e..0aa1762f96 100644 --- a/lib/access_control_permission_patch.rb +++ b/lib/access_control_permission_patch.rb @@ -41,7 +41,7 @@ module AccessControlPermissionPatch found += granulars result = found - while (found.count > 0) && recursive + while (found.length > 0) && recursive found = found.collect{|p| p.inherits(false)}.flatten - result result += found end @@ -54,7 +54,7 @@ module AccessControlPermissionPatch end result = found = parent_perms(self) - while (found.count > 0) && recursive + while (found.length > 0) && recursive found = found.collect{|p| parent_perms(p)}.flatten - result result += found end