public async Task <IActionResult> DeleteConfirmed(System.Int32 id) { if (!UserIsTenantAdminOfActivity(id)) { return(new HttpUnauthorizedResult()); } await _dataAccess.DeleteActivity(id); return(RedirectToAction("Index")); }
public async Task <IActionResult> DeleteConfirmed(System.Int32 id) { var currentUser = await _userManager.GetCurrentUser(Context); if (currentUser == null || !await _userManager.IsTenantAdmin(currentUser)) { return(new HttpUnauthorizedResult()); } if (!await UserIsTenantAdminOfActivity(currentUser, id)) { return(new HttpUnauthorizedResult()); } await _dataAccess.DeleteActivity(id); return(RedirectToAction("Index")); }
public void Delete(int id) { _allReadyDataAccess.DeleteActivity(id); }