public async Task<IActionResult> Delete(string id)
        {
            if (!await _authorizationService.AuthorizeAsync(User, Permissions.ManageApplications))
            {
                return Forbid();
            }

            var application = await _applicationManager.FindByPhysicalIdAsync(id);
            if (application == null)
            {
                return NotFound();
            }

            await _applicationManager.DeleteAsync(application);

            return RedirectToAction(nameof(Index));
        }