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:
17 files changed
+151
-67
No files matched your search
@@ -117,7 +117,8 @@ public sealed class SequenceViewModel : SectionViewModel
|
||||
|
||||
/// <summary>
|
||||
/// Where <paramref name="sequenceId"/> lives: this PC's index, else a sequence of the signed-in server whose proxies
|
||||
/// this PC keeps (Server screen, "Open with proxies"), edited through the server (BRIEF §14.5).
|
||||
/// this PC keeps (Server screen, "Open with proxies"), edited through the server (BRIEF §14.5), or only shown when the
|
||||
/// account may not change it.
|
||||
/// </summary>
|
||||
private async Task<ISequenceSource> OpenSourceAsync(AppServices services, Guid sequenceId)
|
||||
{
|
||||
@@ -134,10 +135,8 @@ public sealed class SequenceViewModel : SectionViewModel
|
||||
// The proxy cache's index and files are read off the UI thread.
|
||||
if (sync.Server is not { } server || sync.Service is not { } service || await Task.Run(() => service.OpenRemote(server, sequenceId)) is not { } remote)
|
||||
throw new InvalidOperationException(Loc.L("Editor.Error.Missing"));
|
||||
// An editor whose saves the server refuses would only lose edits.
|
||||
if (!sync.Policy.CanEdit) throw new InvalidOperationException(Loc.L("Editor.Error.RemoteReadOnly"));
|
||||
var api = sync.ConnectEditor() ?? throw new InvalidOperationException(Loc.L("Editor.Error.Missing"));
|
||||
return new RemoteSequenceSource(remote, api, decoder);
|
||||
return new RemoteSequenceSource(remote, api, decoder, readOnly: !sync.Policy.CanEdit);
|
||||
}
|
||||
|
||||
/// <summary>Set hero changed the frame the Library shows (any thread): its card loads the new thumbnail.</summary>
|
||||
|
||||
Reference in new issue
Block a user