public async Task <IActionResult> Index(DlsSubApplication dlsSubApplication) { if (!DlsSubApplication.TrackingSystem.Equals(dlsSubApplication) && !DlsSubApplication.Frameworks.Equals(dlsSubApplication)) { return(NotFound()); } // TODO HEEDLS-608 If the user is centre admin but tracking system is off we need to show a 404 // TODO HEEDLS-608 name these something appropriate var trackingSystemSupportEnabled = DlsSubApplication.TrackingSystem.Equals(dlsSubApplication) && User.HasCentreAdminPermissions() && await featureManager.IsEnabledAsync(FeatureFlags.RefactoredTrackingSystem); var frameworksSupportEnabled = DlsSubApplication.Frameworks.Equals(dlsSubApplication) && User.HasFrameworksAdminPermissions(); if (trackingSystemSupportEnabled || frameworksSupportEnabled) { var model = new SupportTicketsViewModel( dlsSubApplication, SupportPage.SupportTickets, configuration.GetCurrentSystemBaseUrl() ); return(View("Index", model)); } return(RedirectToAction("Index", "Home")); }
public IActionResult Index(DlsSubApplication dlsSubApplication) { var model = new SupportTicketsViewModel( dlsSubApplication, SupportPage.SupportTickets, configuration.GetCurrentSystemBaseUrl() ); return(View("Index", model)); }