homeland-site 0.1.0 → 0.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f634a2478ab4f74e3cd8f714b655f6e874d38ad4
|
4
|
+
data.tar.gz: 871f12d577ea34fe6c5c046539926ff61d5b2b30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 884db76e610ba4dc1f8e7b6ded7e536c712aae67c46e396ba5ffa26921714f95f7396faa2814189a016dd6a6695e02c2d9755da4213ead2e1d899c70f0aaa632
|
7
|
+
data.tar.gz: de81699890c82ba5a0af042b1d06659a766d51fa7abe9117d61bb8f7c00ed4f3835da4404470849b4e1cad30e231d1a293926d78bd4bcb73665b98a9c4b07bc7
|
@@ -9,7 +9,7 @@ module Homeland::Site
|
|
9
9
|
if @user.blank?
|
10
10
|
roles_for_anonymous
|
11
11
|
elsif user.roles?(:site_editor)
|
12
|
-
can :create, Site
|
12
|
+
can :create, ::Site
|
13
13
|
else
|
14
14
|
roles_for_anonymous
|
15
15
|
end
|
@@ -19,18 +19,18 @@ module Homeland::Site
|
|
19
19
|
|
20
20
|
# 普通会员权限
|
21
21
|
def roles_for_site_editors
|
22
|
-
can :create, Site
|
22
|
+
can :create, ::Site
|
23
23
|
basic_read_only
|
24
24
|
end
|
25
25
|
|
26
26
|
# 未登录用户权限
|
27
27
|
def roles_for_anonymous
|
28
|
-
cannot :manage, Site
|
28
|
+
cannot :manage, ::Site
|
29
29
|
basic_read_only
|
30
30
|
end
|
31
31
|
|
32
32
|
def basic_read_only
|
33
|
-
can :read, Site
|
33
|
+
can :read, ::Site
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|