Skip to content

Commit

Permalink
merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek committed Sep 24, 2024
2 parents 4bf95b2 + 5273938 commit 9f08c3a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public override IDisplayResult Edit(ContentPartFieldDefinition partFieldDefiniti
model.Multiple = settings.Multiple;
var roles = await _roleService.GetRolesAsync();
var roleEntries = roles.Where(role => role.Type != RoleType.System)
.Select(role => new RoleEntry
{
Role = role.RoleName,
IsSelected = settings.DisplayedRoles.Contains(role.RoleName, StringComparer.OrdinalIgnoreCase),
}).ToArray();
.Select(role => new RoleEntry
{
Role = role.RoleName,
IsSelected = settings.DisplayedRoles.Contains(role.RoleName, StringComparer.OrdinalIgnoreCase),
}).ToArray();
model.Roles = roleEntries;
model.DisplayAllUsers = settings.DisplayAllUsers || !roleEntries.Where(x => x.IsSelected).Any();
Expand Down
3 changes: 2 additions & 1 deletion src/docs/releases/2.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ In the Roles feature, there were previously `AssignRoles` and `AssignRole_{RoleN
!!! warning
Please review all your recipes and replace occurrences of `AssignRoles` with `AssignRoleToUsers`, and `AssignRole_{RoleName}` with `AssignRoleToUsers_{RoleName}`.

#### Roles Now Include Types
#### Roles Now Include Types, Deprecating Site Owner Permission

A new `Type` property has been added to the `IRole` interface, and partially surfaced on the role editor UI, which allows defining a role's behavior:

Expand All @@ -73,6 +73,7 @@ A new `Type` property has been added to the `IRole` interface, and partially sur

Furthermore, the `SiteOwner` permission has been deprecated and will be removed in future releases. To prevent any breaking changes, we've introduced a fast-track migration that automatically assigns the `Owner` role type to any role with the `SiteOwner` permission.

Instead of authorizing against the `SiteOwner` permission, the Recipes feature now uses its own Manage Recipes permission (which is automatically available for the Administrator role).
!!! warning
Please set the `Owner` type on roles instead of using the `SiteOwner` permission. The latter will be removed in a future version. Don't authorize against the `SiteOwner` permission in code.

Expand Down
1 change: 0 additions & 1 deletion test/OrchardCore.Tests/Security/PermissionHandlerTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using OrchardCore.Roles.Core;
using OrchardCore.Security;
using OrchardCore.Security.AuthorizationHandlers;
using OrchardCore.Security.Permissions;
Expand Down

0 comments on commit 9f08c3a

Please sign in to comment.