Skip to content

Commit

Permalink
Merge branch 'master' of github.com:owen2345/camaleon-cms
Browse files Browse the repository at this point in the history
  • Loading branch information
owen2345 committed Sep 14, 2017
2 parents c69d554 + c0bcc59 commit c5c9019
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/controllers/camaleon_cms/camaleon_controller.rb
Expand Up @@ -100,7 +100,14 @@ def cama_site_check_existence()
# inactive page control
if current_site.is_inactive?
p = current_site.posts.find(current_site.get_option('page_inactive')).decorate
redirect_to(p.the_url) if params != {"controller"=>"camaleon_cms/frontend", "action"=>"post", "slug"=>p.the_slug}
if request.original_url.to_s.match /\A#{current_site.the_url}admin(\/|\z)/
if cama_current_user.present?
cama_logout_user
flash[:error] = ('Site is Inactive')
end
else
redirect_to(p.the_url) unless params == {"controller"=>"camaleon_cms/frontend", "action"=>"post", "slug"=>p.the_slug}
end
end

# maintenance page and IP's control
Expand Down

0 comments on commit c5c9019

Please sign in to comment.