diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index 65754319..71153a14 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -20,14 +20,14 @@ class Admin::PagesController < ApplicationController def new @item = Page.new @item.parent = Item.find(params[:parent_id]) rescue nil - @apps = ModuleApp.all + @apps = ModuleApp.excludes(app_pages: nil).entries @designs = Design.all.entries @design = Design.first end def edit @item = Page.find(params[:id]) - @apps = ModuleApp.all + @apps = ModuleApp.excludes(app_pages: nil).entries @designs = Design.all.entries @design = @item.design ? @item.design : @designs.first @app_frontend_urls = @item.module_app.app_pages if @item.module_app diff --git a/app/controllers/orbit_backend_controller.rb b/app/controllers/orbit_backend_controller.rb index a03a1f6c..bdddfb43 100644 --- a/app/controllers/orbit_backend_controller.rb +++ b/app/controllers/orbit_backend_controller.rb @@ -23,7 +23,7 @@ class OrbitBackendController< ApplicationController def check_user_can_use unless check_permission #redirect_to polymorphic_path(['panel',@app_title,'back_end','public']) - render :text => '403 Forbidden' + redirect_to root_url end end diff --git a/app/views/admin/pages/_new.html.erb b/app/views/admin/pages/_new.html.erb index d3190e0e..ecbda3de 100644 --- a/app/views/admin/pages/_new.html.erb +++ b/app/views/admin/pages/_new.html.erb @@ -1,7 +1,7 @@ <%= flash_messages %>