V9: Fix granular permissions for user groups (#11577)

* Fixes the treepicker for granular permissions to use a select callback instead of submit with the full selection

* Introduced UserGroup2NodeDto table, to allow users to save empty arrays of permissions

* Cleanup

* Fixed null issue in audit logging

* Fixed migration

* Fixed GetDeleteClauses

* Fixes for SqlCE, do not run multiple comments on one sql request

* Align behavior between content>permissions and usergroups>granularPpermissions

- It is now possible to save default values in content>permissions like in usergroups>granularPpermissions
- It is now possible to differentiate between we save an empty collection and we remove the granular permissions in content>permissions

* Fix comments

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Elitsa Marinovska
2021-11-18 11:20:49 +01:00
committed by GitHub
parent 958cd03b00
commit bfd17846b7
20 changed files with 170 additions and 76 deletions

View File

@@ -226,7 +226,7 @@ namespace Umbraco.Cms.Core.Handlers
foreach (var perm in perms)
{
var group = _userService.GetUserGroupById(perm.UserGroupId);
var assigned = string.Join(", ", perm.AssignedPermissions);
var assigned = string.Join(", ", perm?.AssignedPermissions ?? Array.Empty<string>());
var entity = _entityService.Get(perm.EntityId);
_auditService.Write(performingUser.Id, $"User \"{performingUser.Name}\" {FormatEmail(performingUser)}", PerformingIp,