effective_pages 1.0.15 → 1.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/app/controllers/admin/menus_controller.rb +6 -0
- data/app/controllers/admin/pages_controller.rb +7 -0
- data/lib/effective_pages/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6543449c85d8937224c2fbec985df015fbf6f8bc
|
4
|
+
data.tar.gz: 0eb293faf55a09912783359463d1470004475bb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d4e95dc78ee5a48d3dfc6286971acc2c3356a2581cebc6ec37c3b0919e9612eceb6194ff1d4bbab6bfe6bcb1ded5d7644d3c16af28b9f5e7f0f1ef7f4a747ec
|
7
|
+
data.tar.gz: 638b2dbfdd8ce783739776ae96745525570afade61d1c4298f56904a299871705ded2d6721b451a0fc396dfc14f5a66dec8c0bc07c4c9bf26c6e98f83b3166f9
|
data/README.md
CHANGED
@@ -10,6 +10,7 @@ module Admin
|
|
10
10
|
@datatable = Effective::Datatables::Menus.new() if defined?(EffectiveDatatables)
|
11
11
|
@page_title = 'Menus'
|
12
12
|
|
13
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
13
14
|
EffectivePages.authorized?(self, :index, Effective::Menu)
|
14
15
|
end
|
15
16
|
|
@@ -17,6 +18,7 @@ module Admin
|
|
17
18
|
@menu = Effective::Menu.new()
|
18
19
|
@page_title = 'New Menu'
|
19
20
|
|
21
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
20
22
|
EffectivePages.authorized?(self, :new, @menu)
|
21
23
|
end
|
22
24
|
|
@@ -24,6 +26,7 @@ module Admin
|
|
24
26
|
@menu = Effective::Menu.new(menu_params)
|
25
27
|
@page_title = 'New Menu'
|
26
28
|
|
29
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
27
30
|
EffectivePages.authorized?(self, :create, @menu)
|
28
31
|
|
29
32
|
if @menu.save
|
@@ -39,6 +42,7 @@ module Admin
|
|
39
42
|
@menu = Effective::Menu.find(params[:id])
|
40
43
|
@page_title = 'Edit Menu'
|
41
44
|
|
45
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
42
46
|
EffectivePages.authorized?(self, :edit, @menu)
|
43
47
|
end
|
44
48
|
|
@@ -46,6 +50,7 @@ module Admin
|
|
46
50
|
@menu = Effective::Menu.find(params[:id])
|
47
51
|
@page_title = 'Edit Menu'
|
48
52
|
|
53
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
49
54
|
EffectivePages.authorized?(self, :update, @menu)
|
50
55
|
|
51
56
|
if @menu.update_attributes(menu_params)
|
@@ -60,6 +65,7 @@ module Admin
|
|
60
65
|
def destroy
|
61
66
|
@menu = Effective::Menu.find(params[:id])
|
62
67
|
|
68
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
63
69
|
EffectivePages.authorized?(self, :destroy, @menu)
|
64
70
|
|
65
71
|
if @menu.destroy
|
@@ -6,6 +6,8 @@ module Admin
|
|
6
6
|
|
7
7
|
def index
|
8
8
|
@page_title = 'Pages'
|
9
|
+
|
10
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
9
11
|
EffectivePages.authorized?(self, :index, Effective::Page)
|
10
12
|
|
11
13
|
@datatable = Effective::Datatables::Pages.new() if defined?(EffectiveDatatables)
|
@@ -15,6 +17,7 @@ module Admin
|
|
15
17
|
@page = Effective::Page.new()
|
16
18
|
@page_title = 'New Page'
|
17
19
|
|
20
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
18
21
|
EffectivePages.authorized?(self, :new, @page)
|
19
22
|
end
|
20
23
|
|
@@ -22,6 +25,7 @@ module Admin
|
|
22
25
|
@page = Effective::Page.new(page_params)
|
23
26
|
@page_title = 'New Page'
|
24
27
|
|
28
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
25
29
|
EffectivePages.authorized?(self, :create, @page)
|
26
30
|
|
27
31
|
if @page.save
|
@@ -43,6 +47,7 @@ module Admin
|
|
43
47
|
@page = Effective::Page.find(params[:id])
|
44
48
|
@page_title = 'Edit Page'
|
45
49
|
|
50
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
46
51
|
EffectivePages.authorized?(self, :edit, @page)
|
47
52
|
end
|
48
53
|
|
@@ -50,6 +55,7 @@ module Admin
|
|
50
55
|
@page = Effective::Page.find(params[:id])
|
51
56
|
@page_title = 'Edit Page'
|
52
57
|
|
58
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
53
59
|
EffectivePages.authorized?(self, :update, @page)
|
54
60
|
|
55
61
|
if @page.update_attributes(page_params)
|
@@ -70,6 +76,7 @@ module Admin
|
|
70
76
|
def destroy
|
71
77
|
@page = Effective::Page.find(params[:id])
|
72
78
|
|
79
|
+
EffectivePages.authorized?(self, :admin, :effective_pages)
|
73
80
|
EffectivePages.authorized?(self, :destroy, @page)
|
74
81
|
|
75
82
|
if @page.destroy
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|