diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/NavigationPermissionService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/NavigationPermissionService.cs index a25eb42e..bd4cb5e1 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 this.userGroupService.UserHasCatalogueContributionPermission(userId), + ShowMyContributions = await resourceService.HasPublishedResourcesAsync(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 this.userGroupService.UserHasCatalogueContributionPermission(userId), + ShowMyContributions = await resourceService.HasPublishedResourcesAsync(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 166879ee..dafb3b58 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs @@ -341,7 +341,7 @@ public async Task>> GetLHUserNavigation() } else { - var userId = this.User.Identity.GetCurrentUserId(); + var userId = this.CurrentUserId.GetValueOrDefault(); var (cacheExists, _) = await this.cacheService.TryGetAsync($"{userId}:LoginWizard");