app/controllers/alchemy/admin/pages_controller.rb in alchemy_cms-3.4.2 vs app/controllers/alchemy/admin/pages_controller.rb in alchemy_cms-3.5.0.rc1

- old
+ new

@@ -79,11 +79,11 @@ # Locks the page to current user to prevent other users from editing it meanwhile. # def edit # fetching page via before filter if page_is_locked? - flash[:notice] = Alchemy.t('This page is locked', name: @page.locker_name) + flash[:warning] = Alchemy.t('This page is locked', name: @page.locker_name) redirect_to admin_pages_path elsif page_needs_lock? @page.lock_to!(current_alchemy_user) end @layoutpage = @page.layoutpage? @@ -346,10 +346,10 @@ admin_pages_path end end def redirect_path_after_create_page - if @page.redirects_to_external? + if @page.redirects_to_external? || !@page.editable_by?(current_alchemy_user) admin_pages_path else params[:redirect_to] || edit_admin_page_path(@page) end end