public PreReleaseUserService(ContentDbContext context,
                              UsersAndRolesDbContext usersAndRolesDbContext,
                              IConfiguration configuration,
                              IEmailService emailService,
                              IPreReleaseService preReleaseService,
                              IPersistenceHelper <ContentDbContext> persistenceHelper,
                              IUserService userService,
                              IUserRepository userRepository,
                              IUserInviteRepository userInviteRepository,
                              IUserReleaseRoleRepository userReleaseRoleRepository,
                              IUserReleaseInviteRepository userReleaseInviteRepository,
                              IHttpContextAccessor httpContextAccessor)
 {
     _context = context;
     _usersAndRolesDbContext      = usersAndRolesDbContext;
     _configuration               = configuration;
     _emailService                = emailService;
     _preReleaseService           = preReleaseService;
     _persistenceHelper           = persistenceHelper;
     _userService                 = userService;
     _userRepository              = userRepository;
     _userInviteRepository        = userInviteRepository;
     _userReleaseRoleRepository   = userReleaseRoleRepository;
     _userReleaseInviteRepository = userReleaseInviteRepository;
     _httpContextAccessor         = httpContextAccessor;
 }
 public BootstrapUsersService(
     IConfiguration configuration,
     UsersAndRolesDbContext usersAndRolesDbContext,
     UsersAndRolesDbContext contentDbContext)
 {
     _configuration          = configuration;
     _usersAndRolesDbContext = usersAndRolesDbContext;
     _contentDbContext       = contentDbContext;
 }
 public ExternalLoginModel(
     ISignInManagerDelegate signInManager,
     IUserManagerDelegate userManager,
     ILogger <ExternalLoginModel> logger,
     ContentDbContext contentDbContext,
     UsersAndRolesDbContext usersAndRolesDbContext)
 {
     _signInManager          = signInManager;
     _userManager            = userManager;
     _logger                 = logger;
     _contentDbContext       = contentDbContext;
     _usersAndRolesDbContext = usersAndRolesDbContext;
 }
 public ExternalLoginModel(
     SignInManager <ApplicationUser> signInManager,
     UserManager <ApplicationUser> userManager,
     ILogger <ExternalLoginModel> logger,
     IEmailSender emailSender,
     ContentDbContext contentDbContext,
     UsersAndRolesDbContext usersAndRolesDbContext)
 {
     _signInManager          = signInManager;
     _userManager            = userManager;
     _logger                 = logger;
     _emailSender            = emailSender;
     _contentDbContext       = contentDbContext;
     _usersAndRolesDbContext = usersAndRolesDbContext;
 }
예제 #5
0
 public UserManagementService(UsersAndRolesDbContext usersAndRolesDbContext,
                              ContentDbContext contentDbContext,
                              IPersistenceHelper <UsersAndRolesDbContext> usersAndRolesPersistenceHelper,
                              IEmailTemplateService emailTemplateService,
                              IUserRoleService userRoleService,
                              IUserService userService,
                              IUserInviteRepository userInviteRepository)
 {
     _usersAndRolesDbContext         = usersAndRolesDbContext;
     _contentDbContext               = contentDbContext;
     _usersAndRolesPersistenceHelper = usersAndRolesPersistenceHelper;
     _emailTemplateService           = emailTemplateService;
     _userRoleService      = userRoleService;
     _userService          = userService;
     _userInviteRepository = userInviteRepository;
 }
예제 #6
0
 public UserManagementService(
     UsersAndRolesDbContext usersAndRolesDbContext,
     IUserService userService,
     ContentDbContext contentDbContext,
     IEmailService emailService,
     IConfiguration configuration,
     UserManager <ApplicationUser> userManager,
     IPersistenceHelper <ContentDbContext> persistenceHelper)
 {
     _usersAndRolesDbContext = usersAndRolesDbContext;
     _userService            = userService;
     _contentDbContext       = contentDbContext;
     _emailService           = emailService;
     _configuration          = configuration;
     _userManager            = userManager;
     _persistenceHelper      = persistenceHelper;
 }
예제 #7
0
 private static UserManagementService BuildUserManagementService(
     UsersAndRolesDbContext usersAndRolesDbContext = null,
     IUserService userService                  = null,
     ContentDbContext contentDbContext         = null,
     IEmailService emailService                = null,
     IConfiguration configuration              = null,
     UserManager <ApplicationUser> userManager = null,
     IPersistenceHelper <ContentDbContext> persistenceHelper = null)
 {
     return(new UserManagementService(
                usersAndRolesDbContext,
                userService ?? AlwaysTrueUserService().Object,
                contentDbContext ?? new Mock <ContentDbContext>().Object,
                emailService ?? new Mock <IEmailService>().Object,
                configuration ?? ConfigurationMock().Object,
                userManager ?? MockUserManager().Object,
                persistenceHelper ?? new Mock <IPersistenceHelper <ContentDbContext> >().Object));
 }
예제 #8
0
 public UserRoleService(UsersAndRolesDbContext usersAndRolesDbContext,
                        ContentDbContext contentDbContext,
                        IPersistenceHelper <ContentDbContext> contentPersistenceHelper,
                        IPersistenceHelper <UsersAndRolesDbContext> usersAndRolesPersistenceHelper,
                        IEmailTemplateService emailTemplateService,
                        IUserService userService,
                        IUserPublicationRoleRepository userPublicationRoleRepository,
                        IUserReleaseRoleRepository userReleaseRoleRepository,
                        UserManager <ApplicationUser> userManager)
 {
     _usersAndRolesDbContext         = usersAndRolesDbContext;
     _contentDbContext               = contentDbContext;
     _contentPersistenceHelper       = contentPersistenceHelper;
     _usersAndRolesPersistenceHelper = usersAndRolesPersistenceHelper;
     _emailTemplateService           = emailTemplateService;
     _userService = userService;
     _userPublicationRoleRepository = userPublicationRoleRepository;
     _userReleaseRoleRepository     = userReleaseRoleRepository;
     _userManager = userManager;
 }
예제 #9
0
 private PreReleaseUserService SetupPreReleaseUserService(
     ContentDbContext context,
     UsersAndRolesDbContext usersAndRolesDbContext = null,
     IConfiguration configuration         = null,
     IEmailService emailService           = null,
     IPreReleaseService preReleaseService = null,
     IPersistenceHelper <ContentDbContext> persistenceHelper = null,
     IUserService userService = null,
     IHttpContextAccessor httpContextAccessor = null)
 {
     return(new PreReleaseUserService(
                context,
                usersAndRolesDbContext,
                configuration ?? DefaultConfigurationMock().Object,
                emailService ?? new Mock <IEmailService>().Object,
                preReleaseService ?? new Mock <IPreReleaseService>().Object,
                persistenceHelper ?? new PersistenceHelper <ContentDbContext>(context),
                userService ?? MockUtils.AlwaysTrueUserService().Object,
                httpContextAccessor ?? DefaultHttpContextAccessorMock().Object
                ));
 }
 public UserInviteRepository(UsersAndRolesDbContext usersAndRolesDbContext)
 {
     _usersAndRolesDbContext = usersAndRolesDbContext;
 }