role_authorization 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/role_authorization/roles/manager.rb +4 -4
- data/lib/role_authorization/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 541af4a356ba28b6269226465dd9d76acfdb5e89
|
4
|
+
data.tar.gz: 43f87d74caf25d3e66b48accd568c3eb4fc2f573
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d42c4e46eb0f447c13406932e359ad109a39d92936184b6a19d58d4260970a00894096ed9b1ac754046bec177ba51d45a74734445454dcc69fe4cd2f2fbb6b3a
|
7
|
+
data.tar.gz: acbb4805825873e73d35769219a55d1510bcef976bb4fa6433ee47b466fe3f1d63a9b007c23449bb089a8dbe68a995339569392181c025c652db5ca510f44c31
|
@@ -20,15 +20,15 @@ module RoleAuthorization
|
|
20
20
|
end
|
21
21
|
|
22
22
|
module InstanceMethods
|
23
|
-
def cache_user(role_name, user_id, scope)
|
23
|
+
def cache_user(role_name, user_id, scope = nil)
|
24
24
|
if @cache_user_ids
|
25
|
-
role(role_name).add_user(user_id)
|
25
|
+
role(role_name).add_user(user_id, scope)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
def uncache_user(role_name, user_id)
|
29
|
+
def uncache_user(role_name, user_id, scope = nil)
|
30
30
|
if @cache_user_ids
|
31
|
-
role(role_name).remove_user(user_id)
|
31
|
+
role(role_name).remove_user(user_id, scope)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|