Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private async Task<NavigationModel> AuthenticatedReadOnly(string controllerName,
{
return new NavigationModel()
{
ShowMyContributions = await resourceService.HasPublishedResourcesAsync(userId),
ShowMyContributions = await this.userGroupService.UserHasCatalogueContributionPermission(userId),
ShowMyLearning = true,
ShowMyBookmarks = false,
ShowSearch = controllerName != "search" && controllerName != string.Empty,
Expand All @@ -196,7 +196,7 @@ private async Task<NavigationModel> AuthenticatedBasicUserOnly(int userId)
{
return new NavigationModel()
{
ShowMyContributions = await resourceService.HasPublishedResourcesAsync(userId),
ShowMyContributions = await this.userGroupService.UserHasCatalogueContributionPermission(userId),
ShowMyLearning = true,
ShowMyBookmarks = false,
ShowSearch = true,
Expand Down
4 changes: 2 additions & 2 deletions OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,9 @@ public async Task<List<Dictionary<string, object>>> GetLHUserNavigation()
{
var userId = this.User.Identity.GetCurrentUserId();

////var (cacheExists, _) = await this.cacheService.TryGetAsync<string>($"{userId}:LoginWizard");
var (cacheExists, _) = await this.cacheService.TryGetAsync<string>($"{userId}:LoginWizard");

model = await this.permissionService.GetNavigationModelAsync(this.User, true, string.Empty);
model = await this.permissionService.GetNavigationModelAsync(this.User, !cacheExists, string.Empty);

model.NotificationCount = await this.userNotificationService.GetUserUnreadNotificationCountAsync(userId);
}
Expand Down
Loading