From 3b4e1423635fd9f33ae760312e438cc1e484662e Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 31 Jul 2026 20:41:05 +0200 Subject: Show the gate before it refuses, and check the destination nodes#show renders publish and trash as disabled_action spans with a hint naming what an editor can still do, matching how locked_by_other already reads. Editing and reverting stay live: drafting is free everywhere. --- app/models/user.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/models/user.rb') diff --git a/app/models/user.rb b/app/models/user.rb index e8c3b9bb..bf0f40ee 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -110,6 +110,12 @@ class User < ApplicationRecord redaktion? end + def may_change_live_at?(path) + return true if path.nil? + return true unless Node.restricted_path?(path) + redaktion? + end + def deactivate!(actor:) return false if alumni? transaction do -- cgit v1.3