Skip to content

Exportable Granular Document Property Value permissions #909

@Gustavwk

Description

@Gustavwk

Is your feature request related to a problem? Please describe.

The UserGroupHandler in uSync.Complete 17.0.1 correctly exports Document Property Value permissions (the granular read/write permissions per property per user group introduced in Umbraco 14+), but does not import them back into the umbracoUserGroup2GranularPermission table.

This means granular property-level permissions cannot be deployed between environments via uSync. The export XML contains the permission data, but on import the data is silently ignored — the import reports success with no errors, yet the permissions are not restored.

Steps to reproduce:

  1. Enable UserGroupHandler in appsettings.json
  2. Set a Document Property Value permission on a User Group in the backoffice UI
  3. Run a full uSync export — permission data is present in the exported XML
  4. Wipe the database and run a full import
  5. The permission is not restored — the umbracoUserGroup2GranularPermission table is empty and the permission is missing from the UI

Describe the solution you'd like

The UserGroupHandler deserializer should write the granular permission data from the exported XML back into the umbracoUserGroup2GranularPermission table on import. This would allow full round-trip sync of Document Property Value permissions between environments.

Describe alternatives you've considered

I've written a C# notification handler (UmbracoApplicationStartedNotification) that seeds the permissions directly into the umbracoUserGroup2GranularPermission table at startup using raw SQL. This works but relies on an undocumented internal table structure and has no official Umbraco service-layer API to use instead. It's a fragile workaround that could break on Umbraco upgrades.

I also explored using the frontend Guard Managers (propertyWriteGuard) via a backoffice extension, but this approach cannot target properties inside Block Grid blocks and relies on undocumented internals (_rules.setValue() instead of the documented addRule()).

Additional context
Umbraco version: 17.0.0
uSync.Complete version: 17.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions