Showing the changes to Source/Libraries/GSF.Web/SecurityModule.cs (1 of 9 files). Show all
Unified · Split
| @@ -297,11 +297,11 @@ namespace GSF.Web · 296 unmodified lines | ||
| 297 | 297 | { |
| 298 | 298 | // Check if access to resource is to be secured. |
| 299 | 299 | string resource = GetResourceName(); |
| 300 | + | |
| 300 | 301 | if (!IsAccessSecured(resource)) |
| 301 | 302 | return; |
| 302 | 303 | |
| 303 | − if (SecurityProviderCache.CurrentProvider == null) | |
| 304 | − SecurityProviderCache.CurrentProvider = SecurityProviderUtility.CreateProvider(string.Empty); | |
| 304 | + SecurityProviderCache.ValidateCurrentProvider(); | |
| 305 | 305 | |
| 306 | 306 | if (!m_application.User.Identity.IsAuthenticated) |
| 307 | 307 | // Failed to authenticate user. |