-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update UserMenu.cshtml #100
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,10 +20,7 @@ | |
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown"> | ||
<li><h6 class="dropdown-header">@T["Signed in as"]<span class="ms-1 font-weight-bold">@User.Identity.Name</span></h6></li> | ||
<li><hr class="dropdown-divider" /></li> | ||
@* | ||
TODO: Use CommonPermissions.EditOwnUser once 1.6.0 is released | ||
*@ | ||
@if (await AuthorizationService.AuthorizeAsync(User, CommonPermissions.ManageUsers)) | ||
@if (await AuthorizationService.AuthorizeAsync(User, CommonPermissions.EditOwnUser)) | ||
{ | ||
<li><a class="dropdown-item" asp-area="OrchardCore.Users" asp-action="Edit" asp-controller="Admin" asp-route-returnUrl="@FullRequestPath"><span><i class="far fa-address-card" aria-hidden="true"></i></span> <span> @T["Profile"]</span></a></li> | ||
} | ||
|
@@ -32,6 +29,9 @@ | |
<li><a class="dropdown-item" asp-area="OrchardCore.Users" asp-action="Display" asp-controller="Admin" asp-route-id="@userId" asp-route-returnUrl="@FullRequestPath"><span><i class="far fa-address-card" aria-hidden="true"></i></span> <span> @T["Profile"]</span></a></li> | ||
} | ||
<li><a class="dropdown-item" asp-area="OrchardCore.Users" asp-controller="Account" asp-action="ChangePassword" asp-route-returnUrl="@FullRequestPath"><span><i class="fas fa-key" aria-hidden="true"></i></span> <span> @T["Change password"]</span></a></li> | ||
|
||
@await RenderSectionAsync("UserMenuItems", required: false) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's something new we added to allow others to inject items in this menu. We should at some point submit a PR to remove most of these menu items from the view and use filters to inject them into the view There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Happy to hear that, I will have a look and merge your PR ASAP There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MikeAlhayek I presume this should be in the Users module, right? after that we can inject the menu items from other modules There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should only be in UserMenu view which will optionally allow others to inject into this zone |
||
|
||
<li><button type="submit" class="dropdown-item"><span><i class="fa fa-sign-out-alt" aria-hidden="true"></i></span> <span> @T["Log off"]</span></button></li> | ||
</ul> | ||
</form> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build failed, we need to upgrade to
1.6.0
, I will update in another PR then I will merge this