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