feat(editor): accounts without the Edit right open server sequences read-only

The Server screen offers Open with proxies to viewers; the editor now shows the
sequence with every change disabled and the reason in the tooltips, the session
refuses edits, undo and Optimise, and the source refuses to store a change.
Render says when the account may not render on the server. The event listener
stops cleanly when the editor closes and a late progress event no longer
brings a finished job back to running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-03 16:43:47 +00:00
1 parent 51fb84700e
commit 9cbfaae10d
17 files changed
+151 -67

No files matched your search

+7 -3
View File
@@ -54,6 +54,9 @@ public sealed class EditorSession : IAsyncDisposable
/// <summary>A server sequence edited with proxies: saved, analysed and rendered on the server.</summary>
public bool IsRemote => Source.IsRemote;
/// <summary>The project is shown, not changed (<see cref="ISequenceSource.IsReadOnly"/>): edits, undo and redo do nothing.</summary>
public bool IsReadOnly => Source.IsReadOnly;
public SequenceContent Content { get; private set; }
public SequenceContext Context { get; private set; }
@@ -79,15 +82,15 @@ public sealed class EditorSession : IAsyncDisposable
public bool Edit(Func<ProjectSettings, ProjectSettings> change, string? mergeKey = null)
{
ArgumentNullException.ThrowIfNull(change);
return History.Apply(change(Project), mergeKey);
return !IsReadOnly && History.Apply(change(Project), mergeKey);
}
/// <summary>The drag or key press behind a run of merged edits ended (<see cref="ProjectHistory.EndRun"/>).</summary>
public void EndEditRun() => History.EndRun();
public bool Undo() => History.Undo();
public bool Undo() => !IsReadOnly && History.Undo();
public bool Redo() => History.Redo();
public bool Redo() => !IsReadOnly && History.Redo();
/// <summary>"Optimise section": the advisor's heavier decisions for <paramref name="section"/>, one undo step; returns what changed.</summary>
public IReadOnlyList<SettingChange> Optimise(AdvisorSection section) => Optimise([section]);
@@ -199,6 +202,7 @@ public sealed class EditorSession : IAsyncDisposable
private IReadOnlyList<SettingChange> Optimise(IReadOnlyList<AdvisorSection> sections)
{
if (IsReadOnly) return [];
var settings = Project;
var changes = new List<SettingChange>();
foreach (var section in sections)