🔐 UmbracoTreeHandler – Add User Group-Based Visibility to Content & Media in Umbraco 13
Managing who can see what in the Umbraco backoffice just got easier.
I recently built a new package for Umbraco v13 called UmbracoTreeHandler, which introduces a simple yet powerful way to restrict visibility of content and media based on Umbraco User Groups. If you're building a multi-role CMS or managing sensitive content, this tool is for you.
💡 Why I Built This
By default, Umbraco doesn’t allow associating User Groups directly with content or media nodes. This creates challenges when you want to:
🔒 Hide specific content or media from certain user groups
🎯 Customize the editing experience based on user roles
🧩 Define access boundaries for editorial workflows
With UmbracoTreeHandler, you can now define which user groups can access specific nodes — all through a seamless custom property editor integrated into the backoffice.
🛠️ What the Package Does
✅ Adds a custom property editor named Multi Checkbox Dropdown
✅ Lists all existing Umbraco User Groups dynamically
✅ Works with both Content and Media nodes
✅ Supports multi-selection of user groups via checkboxes
✅ Filters node visibility based on the selected groups using the alias selectUserGroups
✅ Renders the dropdown as read-only for non-admin users — only admins can edit group selection
🔧 How to Use
1. Install the Package
Use NuGet to install the package:
dotnet add package UmbracoTreeHandler
2. Create a New Data Type
Go to Settings > Data Types
Click Create
Choose "Multi Checkbox Dropdown" as the editor (alias: Custom.MultiCheckboxDropdown)
3. Apply to Nodes
Add the data type to any Content or Media node as a property
Use the alias selectUserGroups to activate visibility filtering
The property editor will show a list of all available User Groups in your Umbraco site.
4. Set Visibility
Admin users can select one or more User Groups. Then need to save the node.
The associated node will only be visible to users in those groups
If a user has access to the node but is not an Admin, the dropdown becomes uneditable (read-only) for them
Here’s what the editor looks like:
✅ Multi-checkbox list of Umbraco User Groups
✅ Integrated with existing Content & Media nodes
✅ Auto-updates when new user groups are created
✅ Only editable by Admin users
📦 Package Details
Name: UmbracoTreeHandler
Target CMS: Umbraco v13
Editor Alias: Custom.MultiCheckboxDropdown
NuGet: [https://www.nuget.org/packages/UmbracoTreeHandler/]
🚀 Roadmap
Planned enhancements:
Support for nested content and block list editors
Role-based visibility filtering on the frontend
UI improvements and language translation support
🙌 Try It Out!
If you're using Umbraco 13 and need tighter control over who can see or edit your nodes — UmbracoTreeHandler makes it simple and effective.
Comments
Post a Comment