public async Task <IActionResult> ToggleWorkspaceArchivedState(int id) { if (User.FindFirst(Constants.SuperAdminClaim) is not null) { var workspace = await _workspaceRepository.GetByIdAsync(id); await _workspaceRepository.ToggleArchivedStateAsync(workspace); return(RedirectToAction("EditWorkspace", new { Id = id, ActiveOnly = true })); } return(Unauthorized()); }