Permissions: Added User fallback permission condition (closes #20097)#20224
Merged
leekelleher merged 2 commits intomainfrom Oct 8, 2025
Merged
Permissions: Added User fallback permission condition (closes #20097)#20224leekelleher merged 2 commits intomainfrom
leekelleher merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a fallback user permission condition system to the Umbraco CMS frontend, allowing permissions to be checked against a user's fallback permissions array. This addresses issue #20097 by providing a mechanism to evaluate user permissions with allOf and oneOf logic patterns.
Key Changes:
- Introduces a new
UmbFallbackUserPermissionConditionclass with configurable permission validation - Adds comprehensive test coverage for the permission condition logic
- Provides working examples demonstrating entity user permissions and actions
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Umbraco.Web.UI.Client/src/packages/user/user-permission/manifests.ts | Registers the new fallback permission condition manifest |
| src/Umbraco.Web.UI.Client/src/packages/user/user-permission/index.ts | Exports constants for external consumption |
| src/Umbraco.Web.UI.Client/src/packages/user/user-permission/fallback-permission-condition/types.ts | Defines TypeScript interfaces for the condition configuration |
| src/Umbraco.Web.UI.Client/src/packages/user/user-permission/fallback-permission-condition/manifests.ts | Manifest definition for the fallback permission condition |
| src/Umbraco.Web.UI.Client/src/packages/user/user-permission/fallback-permission-condition/fallback-user-permission.condition.ts | Core implementation of the permission checking logic |
| src/Umbraco.Web.UI.Client/src/packages/user/user-permission/fallback-permission-condition/fallback-user-permission.condition.test.ts | Unit tests covering all permission scenarios |
| src/Umbraco.Web.UI.Client/src/packages/user/user-permission/fallback-permission-condition/constants.ts | Constant definitions for the condition alias |
| src/Umbraco.Web.UI.Client/src/packages/user/user-permission/constants.ts | Re-exports fallback condition constants |
| src/Umbraco.Web.UI.Client/examples/user-permission/* | Example implementation showing how to use the new permission system |
...ges/user/user-permission/fallback-permission-condition/fallback-user-permission.condition.ts
Show resolved
Hide resolved
...ges/user/user-permission/fallback-permission-condition/fallback-user-permission.condition.ts
Show resolved
Hide resolved
src/Umbraco.Web.UI.Client/examples/user-permission/entity-action/action-1.ts
Show resolved
Hide resolved
src/Umbraco.Web.UI.Client/examples/user-permission/entity-action/action-2.ts
Show resolved
Hide resolved
1 task
leekelleher
approved these changes
Oct 8, 2025
Member
leekelleher
left a comment
There was a problem hiding this comment.
Tested out with the user-permission example, works as expected! 🚀
This was referenced Jan 26, 2026
This was referenced Mar 11, 2026
This was referenced Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a condition to check if a verb is stored in the fallbackPermissions array on the Current User.
Fixes: #20097
The PR includes an example of how to set up the an entityUserPermission and apply the condition