public ActivitiesController(PSTS6Context context, IMapper mapper, IRepository repo) { _context = context; _mapper = mapper; _repo = repo; }
public ProjectSecurity(PSTS6Context context, IHttpContextAccessor httpContextAccessor, AuthorizationHandlerContext authContext, string securityObject) { _context = context; _httpContextAccessor = httpContextAccessor; LoggedInUser = authContext.User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier).Value; EditedRecordId = _httpContextAccessor.HttpContext.GetRouteValue("id").ToString(); switch (securityObject) { case "Project": EditedRecord = _context.Project.AsNoTracking().Where(x => x.ID == Convert.ToInt32(EditedRecordId)).FirstOrDefault(); break; case "Task": EditedRecord = _context.Task.AsNoTracking().Include(x => x.Project).Where(x => x.ID == Convert.ToInt32(EditedRecordId)).FirstOrDefault(); break; case "Activity": EditedRecord = _context.Activity.AsNoTracking().Include(x => x.Task).ThenInclude(y => y.Project).Where(x => x.ID == Convert.ToInt32(EditedRecordId)).FirstOrDefault(); break; default: throw new ArgumentException("Invalid argument. The argument must be Project, Task or Activity"); } }
public ProjectsController(PSTS6Context context, IMapper mapper, IOptionsMonitor <ProjectSettings> settings, BackgroundCalculations backgroundCalculations, IRepository repo) { _context = context; _mapper = mapper; _settings = settings.CurrentValue; _backgroundCalculations = backgroundCalculations; _repo = repo; }
public RegisterModel( UserManager <IdentityUser> userManager, SignInManager <IdentityUser> signInManager, ILogger <RegisterModel> logger, IEmailSender emailSender, PSTS6Context context, RoleManager <IdentityRole> roleManager) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _emailSender = emailSender; _context = context; _roleManager = roleManager; }
public CanOnlyCreateDeleteOwnProjects(PSTS6Context context, IHttpContextAccessor httpContextAccessor) { _context = context; _httpContextAccessor = httpContextAccessor; }
public ProjectUserController(PSTS6Context context) { _context = context; }
public DbRepository(PSTS6Context context, IHttpContextAccessor http, BackgroundCalculations backgroundCalculations, DbSet <ProjectTemplate> projectTemplate) { _context = context; _http = http; _backgroundCalculations = backgroundCalculations; }
public TaskTemplatesController(PSTS6Context context, IMapper mapper) { _context = context; _mapper = mapper; }
public CanOnlyEditViewDeleteProjectsWhereIsPMOrAdmin(PSTS6Context context, IHttpContextAccessor httpContextAccessor) { _context = context; _httpContextAccessor = httpContextAccessor; }
public ProjectTemplatesController(PSTS6Context context, IMapper mapper, IRepository repo) { _context = context; _mapper = mapper; _repo = repo; }
public UserController(PSTS6Context context, UserManager <IdentityUser> userManager, RoleManager <IdentityRole> roleManager) { _context = context; _userManager = userManager; _roleManager = roleManager; }
public CanOnlyEditOwnedActivitiesHandler(PSTS6Context context, IHttpContextAccessor httpContextAccessor) { _context = context; _httpContextAccessor = httpContextAccessor; }
public CanOnlyEditViewTasksFromOwnProjects(IHttpContextAccessor httpContextAccessor, PSTS6Context context) { _httpContextAccessor = httpContextAccessor; _context = context; }
public CanOnlyCreateDeleteActivitiesFromOwnProject(PSTS6Context context, IHttpContextAccessor httpContextAccessor) { _context = context; _httpContextAccessor = httpContextAccessor; }
public ActivityTemplatesController(PSTS6Context context) { _context = context; }