We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6180daf commit 90e9084Copy full SHA for 90e9084
lib/ya_acl/builder.rb
@@ -35,7 +35,8 @@ def resources(allow, &block)
35
36
def resource(name, allow_roles = [], &block)
37
raise ArgumentError, 'Options "allow_roles" must be Array' unless allow_roles.is_a? Array
38
- resource_allow_roles = allow_roles << @global_allow_role
+ resource_allow_roles = allow_roles
39
+ resource_allow_roles << @global_allow_role if @global_allow_role
40
resource = Resource.new(name)
41
acl.add_resource resource
42
PrivilegeProxy.new(resource.name, resource_allow_roles, acl, block)
0 commit comments