Users: Hiding the Unpublish and Delete buttons in the User editor

This commit is contained in:
Benedek Farkas
2025-09-26 18:41:31 +02:00
parent e7e888d422
commit 99ce4ca61e
5 changed files with 8 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ using Orchard.Users.Models;
namespace Orchard.Users.Drivers {
/// <summary>
/// This class intentionnaly has no Display method to prevent external access to this information through standard
/// This class intentionally has no Display method to prevent external access to this information through standard
/// Content Item display methods.
/// </summary>
public class UserPartDriver : ContentPartDriver<UserPart> {

View File

@@ -252,6 +252,8 @@
<Content Include="Views\EditorTemplates\Parts\Users.SuspensionSettings.cshtml" />
<Content Include="Views\EditorTemplates\Parts\User.UserSecurityConfiguration.cshtml" />
<Content Include="Views\Account\RequestChallengeEmail.cshtml" />
<Content Include="Views\Content.UnpublishButton-User.cshtml" />
<Content Include="Views\Content.DeleteButton-User.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Account\ChangeExpiredPassword.cshtml" />
@@ -306,4 +308,4 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
</Project>

View File

@@ -3,5 +3,7 @@
<Place Parts_User_EditPassword_Edit="Content:1"/>
<Place Parts_User_UserSecurityConfiguration_Edit="Content:1.1"/>
<Place Parts_UserApprove_Edit="Sidebar:25"/> <!-- immediately following the contents module's Approve Now button -->
<!-- The Unpublish and Delete buttons are hidden with type-specific shape overrides, because placement wasn't effective. -->
</Match>
</Placement>