Ejemplo n.º 1
0
        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"));
        }
Ejemplo n.º 2
0
 public void Delete(int id)
 {
     _prepOpsDataAccess.DeleteActivity(id);
 }