diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/NavigationPermissionService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/NavigationPermissionService.cs index bd4cb5e1..a25eb42e 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/NavigationPermissionService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/NavigationPermissionService.cs @@ -172,7 +172,7 @@ private async Task 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, @@ -196,7 +196,7 @@ private async Task AuthenticatedBasicUserOnly(int userId) { return new NavigationModel() { - ShowMyContributions = await resourceService.HasPublishedResourcesAsync(userId), + ShowMyContributions = await this.userGroupService.UserHasCatalogueContributionPermission(userId), ShowMyLearning = true, ShowMyBookmarks = false, ShowSearch = true, diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs index 89c3fb1c..166879ee 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs @@ -343,9 +343,9 @@ public async Task>> GetLHUserNavigation() { var userId = this.User.Identity.GetCurrentUserId(); - ////var (cacheExists, _) = await this.cacheService.TryGetAsync($"{userId}:LoginWizard"); + var (cacheExists, _) = await this.cacheService.TryGetAsync($"{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); }