Skip to content

Commit bbde34d

Browse files
Fixing that displaying the publish button in the user editor should depend on ManageUsers permissions instead of PublishContent (#8886)
1 parent 9de766d commit bbde34d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@
254254
<Content Include="Views\Account\RequestChallengeEmail.cshtml" />
255255
<Content Include="Views\Content.UnpublishButton-User.cshtml" />
256256
<Content Include="Views\Content.DeleteButton-User.cshtml" />
257+
<Content Include="Views\Content.PublishButton-User.cshtml" />
257258
</ItemGroup>
258259
<ItemGroup>
259260
<Content Include="Views\Account\ChangeExpiredPassword.cshtml" />
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@using Orchard.ContentManagement
2+
@using Orchard.Users
3+
4+
@if (Authorizer.Authorize(Permissions.ManageUsers, (IContent)Model.ContentItem))
5+
{
6+
<fieldset class="publish-button">
7+
<button class="primaryAction" type="submit" name="submit.Publish" value="submit.Publish">@T("Publish")</button>
8+
</fieldset>
9+
}

0 commit comments

Comments
 (0)