-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f445c4
commit f91748f
Showing
32 changed files
with
340 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/OrchardCore.Modules/OrchardCore.Notifications/Views/UserNotificationCollection.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/OrchardCore.Modules/OrchardCore.Users/Drivers/ChangeEmailUserMenuDisplayDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using OrchardCore.DisplayManagement.Handlers; | ||
using OrchardCore.DisplayManagement.Views; | ||
using OrchardCore.Entities; | ||
using OrchardCore.Settings; | ||
using OrchardCore.Users.Models; | ||
|
||
namespace OrchardCore.Users.Drivers; | ||
|
||
public class ChangeEmailUserMenuDisplayDriver : DisplayDriver<UserMenu> | ||
{ | ||
private readonly ISiteService _siteService; | ||
|
||
public ChangeEmailUserMenuDisplayDriver(ISiteService siteService) | ||
{ | ||
_siteService = siteService; | ||
} | ||
|
||
public override IDisplayResult Display(UserMenu model) | ||
{ | ||
return View("UserMenuItems__ChangeEmail", model) | ||
.RenderWhen(async () => (await _siteService.GetSiteSettingsAsync()).As<ChangeEmailSettings>().AllowChangeEmail) | ||
.Location("Detail", "Content:20") | ||
.Location("DetailAdmin", "Content:20"); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/OrchardCore.Modules/OrchardCore.Users/Drivers/TwoFactorUserMenuDisplayDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using OrchardCore.DisplayManagement.Handlers; | ||
using OrchardCore.DisplayManagement.Views; | ||
using OrchardCore.Users.Models; | ||
|
||
namespace OrchardCore.Users.Drivers; | ||
|
||
public class TwoFactorUserMenuDisplayDriver : DisplayDriver<UserMenu> | ||
{ | ||
public override IDisplayResult Display(UserMenu model) | ||
{ | ||
return View("UserMenuItems__TwoFactor", model) | ||
.Location("Detail", "Content:15") | ||
.Location("DetailAdmin", "Content:15"); | ||
} | ||
} |
Oops, something went wrong.