role_authorization 0.3.9 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -20,10 +20,14 @@ module RoleAuthorization
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def users(scope = nil)
|
23
|
-
if
|
24
|
-
|
23
|
+
if user_ids.blank?
|
24
|
+
[]
|
25
25
|
else
|
26
|
-
|
26
|
+
if scope.nil?
|
27
|
+
RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids.values.flatten.uniq).all
|
28
|
+
else
|
29
|
+
RoleAuthorization::Roles::Manager.user_klass.where(:id => user_ids[scope_with(scope)]).all
|
30
|
+
end
|
27
31
|
end
|
28
32
|
end
|
29
33
|
|