effective_roles 1.4.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: daa39b1deb06301a041b563ca1e6cd01bfc294dd
4
- data.tar.gz: e5d5c609a1369bd55be217e89e5997bb46508187
3
+ metadata.gz: 0008cff5d883db3f4b297653d083c5d189efad97
4
+ data.tar.gz: 91640687e9b387abfd09680d1f3812743e501ebb
5
5
  SHA512:
6
- metadata.gz: 80abd7f6ce9625b4db2066a87b3c05a4941b443eda69f1cb15bbf148f85115660fe97f7033705971dc67fa171d353c6036798d1bb21fe0f6ae1caa35e8245c62
7
- data.tar.gz: db919cf4186fe8b6868da00a215ffa274fe60db482eca1e4e7e7a8f0fdde6dbc7cd409df0ba836bed2cf67432a8b7b4056dc2c274019cd9e00d51f74e5345272
6
+ metadata.gz: 1ed90b01364f7966d6f628e6779a0ddb302d0d42a5ee3c2a9b6ccada42599be8dd353cf514eb84f611bdf9be874d40f9bc9274ac2e5b18cafebda162ce7cb1a8
7
+ data.tar.gz: bb536a4f8677cc5a619d4a7a816b97ca11eb1b3341ce7d971c04fc605abbf2ed17d727b74b75bb03abd702f641ff117e1f8abd884c585efb31c9886f665c7273
@@ -57,7 +57,7 @@ module ActsAsRoleRestricted
57
57
 
58
58
  roles = (roles.map { |role| role.to_sym } & EffectiveRoles.roles)
59
59
 
60
- where(roles.map { |role| "NOT(#{self.table_name}.roles_mask & %d > 0)" % 2**EffectiveRoles.roles.index(role) }.join(' OR '))
60
+ where(roles.map { |role| "NOT(#{self.table_name}.roles_mask & %d > 0)" % 2**EffectiveRoles.roles.index(role) }.join(' AND '))
61
61
  end
62
62
  end
63
63
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveRoles
2
- VERSION = '1.4.2'.freeze
2
+ VERSION = '1.4.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_roles
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-20 00:00:00.000000000 Z
11
+ date: 2017-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails