protected override bool AuthorizeCore(HttpContextBase httpContext) { Verify.NotNull(httpContext, nameof(httpContext)); var systemLogin = new DivingTrackerEntities().SystemLogins .FirstOrDefault(x => x.EmailAddress.Equals(httpContext.User.Identity.Name)); return(systemLogin?.Users.Any(x => _roles.Contains((SystemRoles)x.SystemRole.SystemRoleId)) ?? false); }
public AuthenticationController(DivingTrackerEntities databaseContext, IAuthenticationService authenticationService, IEmailService emailService) : base(databaseContext) { Verify.NotNull(authenticationService, nameof(authenticationService)); Verify.NotNull(emailService, nameof(emailService)); _authenticationService = authenticationService; _emailService = emailService; }
public ErrorController(DivingTrackerEntities databaseContext) : base(databaseContext) { }
public AuthenticationWorkflow(DivingTrackerEntities databaseContext) { _databaseContext = databaseContext; }
public DivingTrackerBaseController(DivingTrackerEntities databaseContext) { Verify.NotNull(databaseContext, nameof(databaseContext)); DatabaseContext = databaseContext; }
public MembersController(DivingTrackerEntities databaseContext) : base(databaseContext) { }
public EmailWorkflow(DivingTrackerEntities databaseContext) { _databaseContext = databaseContext; }
public QualificationsController(DivingTrackerEntities databaseContext) : base(databaseContext) { }
public TrainingController(DivingTrackerEntities databaseContext) : base(databaseContext) { }