caboose-cms 0.9.114 → 0.9.115
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/caboose/pages_controller.rb +13 -13
- data/lib/caboose/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: c881ecff72b90de1f04649f55304be6eedfe0eae
|
4
|
+
data.tar.gz: a79e20da78208dbcecc615da798fb73bff964760
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1be162c82d2f71eec2df372e02de03204520bc920952608c03445f8f2c03f550f0b11a07a876e5c71d5cfe6dac2d476dc7e88fe9ce425d83b99c1ba54d464e16
|
7
|
+
data.tar.gz: 2e5c6970cac98644bdaeddb720fc99231069439bb13c70d8356dd538b8ab4a8d76d2a2a1afe3fe5e057d1ab997de6671e49802dd11fed55152a57b886217244d
|
@@ -173,7 +173,7 @@ module Caboose
|
|
173
173
|
def admin_edit_permissions
|
174
174
|
return unless user_is_allowed('pages', 'edit')
|
175
175
|
@page = Page.find(params[:id])
|
176
|
-
if @page.site_id != @logged_in_user.site_id
|
176
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
177
177
|
redirect_to '/admin/pages'
|
178
178
|
else
|
179
179
|
render :layout => 'caboose/admin'
|
@@ -194,7 +194,7 @@ module Caboose
|
|
194
194
|
def admin_edit_content
|
195
195
|
@page = Page.find(params[:id])
|
196
196
|
redirect_to "/login?return_url=/admin/pages/#{@page.id}/content" and return if @logged_in_user.nil?
|
197
|
-
condition = @logged_in_user && @logged_in_user.site_id == @page.site_id && ( @logged_in_user.is_allowed('all','all') || @logged_in_user.is_allowed('pages','edit') && Page.permissible_actions(@logged_in_user, @page.id).include?('edit'))
|
197
|
+
condition = @logged_in_user && (@logged_in_user.is_super_admin? || (@logged_in_user.site_id == @page.site_id && ( @logged_in_user.is_allowed('all','all') || @logged_in_user.is_allowed('pages','edit') && Page.permissible_actions(@logged_in_user, @page.id).include?('edit'))))
|
198
198
|
redirect_to "/admin/pages" and return unless condition
|
199
199
|
if @page.block.nil?
|
200
200
|
redirect_to "/admin/pages/#{@page.id}/layout"
|
@@ -207,7 +207,7 @@ module Caboose
|
|
207
207
|
def admin_edit_layout
|
208
208
|
return unless user_is_allowed('pages', 'edit')
|
209
209
|
@page = Page.find(params[:id])
|
210
|
-
if @page.site_id != @logged_in_user.site_id
|
210
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
211
211
|
redirect_to '/admin/pages'
|
212
212
|
else
|
213
213
|
render :layout => 'caboose/admin'
|
@@ -219,7 +219,7 @@ module Caboose
|
|
219
219
|
return unless user_is_allowed('pages', 'edit')
|
220
220
|
resp = StdClass.new({'attributes' => {}})
|
221
221
|
@page = Page.find(params[:id])
|
222
|
-
if @page.site_id != @logged_in_user.site_id
|
222
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
223
223
|
redirect_to '/admin/pages'
|
224
224
|
else
|
225
225
|
@page.hide = false
|
@@ -234,7 +234,7 @@ module Caboose
|
|
234
234
|
return unless user_is_allowed('pages', 'edit')
|
235
235
|
resp = StdClass.new({'attributes' => {}})
|
236
236
|
@page = Page.find(params[:id])
|
237
|
-
if @page.site_id != @logged_in_user.site_id
|
237
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
238
238
|
redirect_to '/admin/pages'
|
239
239
|
else
|
240
240
|
@page.hide = true
|
@@ -309,7 +309,7 @@ module Caboose
|
|
309
309
|
def admin_edit_css
|
310
310
|
return unless user_is_allowed('pages', 'edit')
|
311
311
|
@page = Page.find(params[:id])
|
312
|
-
if @page.site_id != @logged_in_user.site_id
|
312
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
313
313
|
redirect_to '/admin/pages'
|
314
314
|
else
|
315
315
|
render :layout => 'caboose/admin'
|
@@ -320,7 +320,7 @@ module Caboose
|
|
320
320
|
def admin_edit_js
|
321
321
|
return unless user_is_allowed('pages', 'edit')
|
322
322
|
@page = Page.find(params[:id])
|
323
|
-
if @page.site_id != @logged_in_user.site_id
|
323
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
324
324
|
redirect_to '/admin/pages'
|
325
325
|
else
|
326
326
|
render :layout => 'caboose/admin'
|
@@ -331,7 +331,7 @@ module Caboose
|
|
331
331
|
def admin_edit_seo
|
332
332
|
return unless user_is_allowed('pages', 'edit')
|
333
333
|
@page = Page.find(params[:id])
|
334
|
-
if @page.site_id != @logged_in_user.site_id
|
334
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
335
335
|
redirect_to '/admin/pages'
|
336
336
|
else
|
337
337
|
render :layout => 'caboose/admin'
|
@@ -342,7 +342,7 @@ module Caboose
|
|
342
342
|
def admin_edit_child_sort_order
|
343
343
|
return unless user_is_allowed('pages', 'edit')
|
344
344
|
@page = Page.find(params[:id])
|
345
|
-
if @page.site_id != @logged_in_user.site_id
|
345
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
346
346
|
redirect_to '/admin/pages'
|
347
347
|
else
|
348
348
|
render :layout => 'caboose/admin'
|
@@ -368,7 +368,7 @@ module Caboose
|
|
368
368
|
def admin_duplicate_form
|
369
369
|
return unless user_is_allowed('pages', 'add')
|
370
370
|
@page = Page.find(params[:id])
|
371
|
-
if @page.site_id != @logged_in_user.site_id
|
371
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
372
372
|
redirect_to '/admin/pages'
|
373
373
|
else
|
374
374
|
render :layout => 'caboose/admin'
|
@@ -403,7 +403,7 @@ module Caboose
|
|
403
403
|
def admin_delete_form
|
404
404
|
return unless user_is_allowed('pages', 'delete')
|
405
405
|
@page = Page.find(params[:id])
|
406
|
-
if @page.site_id != @logged_in_user.site_id
|
406
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
407
407
|
redirect_to '/admin/pages'
|
408
408
|
else
|
409
409
|
render :layout => 'caboose/admin'
|
@@ -421,7 +421,7 @@ module Caboose
|
|
421
421
|
def admin_sitemap
|
422
422
|
return unless user_is_allowed('pages', 'delete')
|
423
423
|
@page = Page.find(params[:id])
|
424
|
-
if @page.site_id != @logged_in_user.site_id
|
424
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
425
425
|
redirect_to '/admin/pages'
|
426
426
|
else
|
427
427
|
render :layout => 'caboose/admin'
|
@@ -433,7 +433,7 @@ module Caboose
|
|
433
433
|
return if !user_is_allowed('pages', 'edit')
|
434
434
|
#return if !Page.is_allowed(logged_in_user, params[:id], 'edit')
|
435
435
|
@page = Page.find(params[:id])
|
436
|
-
if @page.site_id != @logged_in_user.site_id
|
436
|
+
if @page.site_id != @logged_in_user.site_id && !@logged_in_user.is_super_admin?
|
437
437
|
redirect_to '/admin/pages'
|
438
438
|
else
|
439
439
|
render :layout => 'caboose/admin'
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.115
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|