usman 0.4.8.pre.materialize → 0.4.9.pre.materialize
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/user.rb +8 -4
- data/lib/usman/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0589427dbb92c0128edc21fb10657689fe415d88cb62fe46e3ccf99bce92bb10'
|
4
|
+
data.tar.gz: 991ff93acbb80917fefaa86ad0280d990530a4af28e06e083e477cae7036f4a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60e1d2dca5a38ee6fd8d4e95d0134a6a71b5d7e9956dca5a01f96335f282ca399f59dfe074371cf1c915bb6e1cc7c3fb9d5a1fa0290b239f8aa000447fec2b40
|
7
|
+
data.tar.gz: 7857d2b5a02c4622caa519cbf0e2b94332428708bc1fa7d67ebc4987cdd8e9bcddf37308f0272f9b42316d007d6bdb9d38b9e54e8e9fb2728c98a0cc6f43ac8a
|
data/app/models/user.rb
CHANGED
@@ -454,13 +454,17 @@ class User < Usman::ApplicationRecord
|
|
454
454
|
case role
|
455
455
|
|
456
456
|
when String
|
457
|
-
self.roles.where(name: role).count > 0
|
457
|
+
# self.roles.where(name: role).count > 0
|
458
|
+
self.roles.select{|x| x.name == role }.count > 0
|
458
459
|
when Integer
|
459
|
-
self.roles.where(id: role).count > 0
|
460
|
+
# self.roles.where(id: role).count > 0
|
461
|
+
self.roles.select{|x| x.id == role }.count > 0
|
460
462
|
when Array
|
461
|
-
self.roles.where(name: role).count > 0
|
463
|
+
# self.roles.where(name: role).count > 0
|
464
|
+
self.roles.select{|x| role.include?(x.name) }.count > 0
|
462
465
|
when Role
|
463
|
-
self.roles.where(id: role.id).count > 0
|
466
|
+
# self.roles.where(id: role.id).count > 0
|
467
|
+
self.roles.select{|x| x == role }.count > 0
|
464
468
|
else
|
465
469
|
return false
|
466
470
|
end
|
data/lib/usman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.9.pre.materialize
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -104,14 +104,14 @@ dependencies:
|
|
104
104
|
requirements:
|
105
105
|
- - ">="
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: 0.2.
|
107
|
+
version: 0.2.11.pre.materialize
|
108
108
|
type: :runtime
|
109
109
|
prerelease: false
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
112
|
- - ">="
|
113
113
|
- !ruby/object:Gem::Version
|
114
|
-
version: 0.2.
|
114
|
+
version: 0.2.11.pre.materialize
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: pattana
|
117
117
|
requirement: !ruby/object:Gem::Requirement
|