Knowit.Umbraco.EditorLock 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Knowit.Umbraco.EditorLock --version 1.0.0
                    
NuGet\Install-Package Knowit.Umbraco.EditorLock -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Knowit.Umbraco.EditorLock" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Knowit.Umbraco.EditorLock" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Knowit.Umbraco.EditorLock" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Knowit.Umbraco.EditorLock --version 1.0.0
                    
#r "nuget: Knowit.Umbraco.EditorLock, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Knowit.Umbraco.EditorLock@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Knowit.Umbraco.EditorLock&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Knowit.Umbraco.EditorLock&version=1.0.0
                    
Install as a Cake Tool

Knowit.Umbraco.EditorLock

Stop two editors from changing the same Umbraco content node at the same time.

When an editor opens a document, they hold an editing lock on it. If a second editor opens the same document, their editor turns read-only (with a red border) and the normal Save buttons are replaced by Request access and Force access. Real-time, over SignalR.

Built for the new (Lit/Web Components) Umbraco backoffice. Umbraco 17+.

Screenshots

Second editor โ€” locked out (read-only, red border, lock buttons):

Locked, read-only node with a red border

Requesting access โ€” the holder is prompted to accept or decline:

Access requested confirmation

Holder accept/decline prompt

Force access โ€” confirm before taking over:

Force access confirmation

The holder keeps editing as normal:

Editor with normal Save buttons

Features

  • ๐Ÿ”’ Automatic locking โ€” the first editor to open a node holds the lock.
  • ๐ŸŸฅ Read-only + red border for anyone else who opens the same node.
  • ๐Ÿ™‹ Request access โ€” politely ask the current editor to hand over; they get an Accept/Decline prompt.
  • โšก Force access โ€” take over immediately (with a confirmation naming the current editor).
  • โ™ป๏ธ Never stuck โ€” if the holder closes their browser or goes idle, the lock auto-releases so others can edit.
  • ๐Ÿงน Save / Save and publish / Save and preview are hidden while you're locked out โ€” only the lock actions show.

Installation

dotnet add package Knowit.Umbraco.EditorLock

That's it โ€” there's nothing to register. The package wires up its SignalR hub and backoffice extensions automatically. Restart the site and the lock is active on the content section.

How it works

  • A SignalR hub (/umbraco/knowitEditorLockHub, secured to backoffice users) carries the whole protocol: acquire/observe, release, request, respond, force, and heartbeats.
  • A backoffice workspace context acquires/observes the lock for the open document and toggles read-only via the content workspace's read-only guard.
  • Active locks are held in memory (a singleton service). This means locks reset on app restart and are not shared across load-balanced servers. For those scenarios, supply your own IEditorLockService implementation (it's a clean drop-in seam).

Configuration

Defaults live in Constants.cs: lock timeout 60s, heartbeat/cleanup interval 20s. Detailed SignalR errors are enabled to aid debugging โ€” you may want to disable that for production.

Building from source

The backoffice client (Lit/TypeScript) compiles into wwwroot/App_Plugins/Knowit.Umbraco.EditorLock.

# 1. Build the client (required once on a fresh checkout โ€” the SDK globs wwwroot at evaluation time)
cd Knowit.Umbraco.EditorLock/Client
npm install
npm run build

# 2. Pack (a Release build re-runs the client build automatically)
cd ../..
dotnet pack Knowit.Umbraco.EditorLock/Knowit.Umbraco.EditorLock.csproj -c Release -o ./artifacts

Requirements

  • Umbraco CMS 17+
  • .NET 10

License

MIT. Built with AI assistance and reviewed before release.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 130 6/22/2026
1.0.1 115 6/22/2026
1.0.0 124 6/22/2026