diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-31 22:36:17 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-31 22:36:17 +0200 |
| commit | 529f81b28ed77c62acaa63fad957e751798f2440 (patch) | |
| tree | 9d928cbe54008b1f75c4b813182970dd0757002c /app/controllers/admin_controller.rb | |
| parent | 3b4e1423635fd9f33ae760312e438cc1e484662e (diff) | |
Warn before the gate refuses, and check restore destinations
nodes#new marks the kinds that place under /updates, derived from each kind's
own path_prefix. The three parent pickers mark candidates the current user
cannot publish into; menu_search returns needs_redaktion per result, computed
per user rather than as a bare restricted flag, and the menu-item picker opts
out.
restore_from_trash! checks its destination: the restore is the move, applied
rather than staged, so no later publish would have caught it. The node
returns as a draft either way.
Diffstat (limited to 'app/controllers/admin_controller.rb')
| -rw-r--r-- | app/controllers/admin_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 3b8b3582..c23cec04 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb | |||
| @@ -67,7 +67,9 @@ class AdminController < ApplicationController | |||
| 67 | 67 | ||
| 68 | format.js do | 68 | format.js do |
| 69 | render( :json => @results.map do |node| | 69 | render( :json => @results.map do |node| |
| 70 | {:node_id => node.id, :title => node.title, :unique_name => node.unique_name, :node_path => node_path(node)} | 70 | { :node_id => node.id, :title => node.title, |
| 71 | :unique_name => node.unique_name, :node_path => node_path(node), | ||
| 72 | :needs_redaktion => !current_user.may_change_live?(node) } | ||
| 71 | end | 73 | end |
| 72 | ) | 74 | ) |
| 73 | 75 | ||
