コード例 #1
0
 public CommonStatisticsDashboardWidgetDataCreator(IOrderDataService orderDataService, IUserDataService userDataService, IAppRoleManager roleManager, IProductDataService productDataService)
 {
     _orderDataService   = orderDataService;
     _userDataService    = userDataService;
     _roleManager        = roleManager;
     _productDataService = productDataService;
 }
コード例 #2
0
 public AppUnitOfWork()
 {
     database       = new AppIdentityDbContext();
     roleManager    = new AppRoleManager(new RoleStore <Role>(database));
     userManager    = new AppUserManager(new UserStore <User>(database));
     postRepository = new PostRepository(database);
 }
コード例 #3
0
 public GetEditorsListQueryHandler(IUserRoleRepository userRoleRepository, IAppRoleManager appRoleManager,
     IAppUserManager appUserManager, IMapper mapper)
 {
     _userRoleRepository = userRoleRepository;
     _appRoleManager = appRoleManager;
     _appUserManager = appUserManager;
     _mapper = mapper;
 }
コード例 #4
0
 public AppClaimsTransformation(
     IAppUserManager userManager,
     IAppRoleManager roleManager,
     ILogger <AppClaimsTransformation> logger)
 {
     _userManager = userManager ?? throw new ArgumentNullException(nameof(userManager));
     _roleManager = roleManager ?? throw new ArgumentNullException(nameof(roleManager));
     _logger      = logger ?? throw new ArgumentNullException(nameof(logger));
 }
コード例 #5
0
 public AppClaimsPrincipalFactory(
     IAppUserManager userManager,
     IAppRoleManager roleManager,
     IOptions <IdentityOptions> optionsAccessor)
     : base((UserManager <User>)userManager, (RoleManager <Role>)roleManager, optionsAccessor)
 {
     _userManager     = userManager ?? throw new ArgumentNullException(nameof(_userManager));
     _roleManager     = roleManager ?? throw new ArgumentNullException(nameof(_roleManager));
     _optionsAccessor = optionsAccessor ?? throw new ArgumentNullException(nameof(_optionsAccessor));
 }
コード例 #6
0
 public AppUserManager(IUserStore <User> store,
                       IOptions <IdentityOptions> optionsAccessor,
                       IPasswordHasher <User> passwordHasher, IEnumerable <IUserValidator <User> > userValidators,
                       IEnumerable <IPasswordValidator <User> > passwordValidators,
                       ILookupNormalizer keyNormalizer,
                       IdentityErrorDescriber errors, IServiceProvider services, ILogger <UserManager <User> > logger,
                       IConfiguration configuration,
                       IMapper mapper, IAppRoleManager roleManager) : base(store,
                                                                           optionsAccessor, passwordHasher, userValidators, passwordValidators, keyNormalizer, errors, services,
                                                                           logger)
 {
     _configuration = configuration;
     _mapper        = mapper;
     _roleManager   = roleManager;
 }
コード例 #7
0
        public AppUserManager(IUserStore <User, Guid> store, IUnitOfWork unitOfWork, IAppRoleManager roleManager, IEmailSecuriyService emailSecuriyService) : base(store)
        {
            _unitOfWork       = unitOfWork;
            _roleManager      = roleManager;
            _users            = _unitOfWork.Set <User>();
            _roles            = _unitOfWork.Set <Role>();
            this.EmailService = emailSecuriyService;
            var provider = new DpapiDataProtectionProvider("Sample");

            this.UserTokenProvider = new DataProtectorTokenProvider <User, Guid>(
                provider.Create("EmailConfirmation"));
            UserLockoutEnabledByDefault          = true;
            DefaultAccountLockoutTimeSpan        = TimeSpan.FromMinutes(10);
            MaxFailedAccessAttemptsBeforeLockout = 5;
            _currUser = new Lazy <User>(GetCurrentUser, false);
        }
コード例 #8
0
        public DbInitializerService(
            IOptionsSnapshot <BehlogSetting> settings,
            IAppUserManager userManager,
            ILogger <IDbInitializer> logger,
            IAppRoleManager roleManager,
            IServiceScopeFactory scopeFactory,
            IDateService dateSvc,
            ILanguageService languageSvc,
            ILayoutService layoutSvc,
            IWebsiteService websiteSvc
            )
        {
            logger.CheckArgumentIsNull();
            _logger = logger;

            settings.CheckArgumentIsNull();
            _settings = settings;

            userManager.CheckArgumentIsNull();
            _userManager = userManager;

            logger.CheckArgumentIsNull();
            logger = _logger;

            roleManager.CheckArgumentIsNull();
            _roleManager = roleManager;

            scopeFactory.CheckArgumentIsNull();
            _scopeFactory = scopeFactory;

            dateSvc.CheckArgumentIsNull();
            _dateSvc = dateSvc;

            languageSvc.CheckArgumentIsNull();
            _languageSvc = languageSvc;

            layoutSvc.CheckArgumentIsNull();
            _layoutSvc = layoutSvc;

            websiteSvc.CheckArgumentIsNull();
            _websiteSvc = websiteSvc;
        }
コード例 #9
0
 public UserManagementService(List<IBaseBeforeAddingEntityLogic> baseBeforeAddingEntityLogics,
     List<BaseAfterAddingEntityLogic> baseAfterAddingEntityLogics,
     List<IBaseAfterUpdatingEntityLogic> baseAfterUpdateEntityLogics,
     List<IBaseBeforeUpdatingEntityLogic> baseBeforeUpdateEntityLogics,
     List<IBaseBeforeDeleteEntityLogic> baseBeforeDeleteEntityLogics,
     List<BaseAfterDeleteEntityLogic> baseAfterDeleteEntityLogics, IIdentityManager identityManager,
     IRestrictedItemAccessManager accessManager, IUserDataService userDataSrv,
     IUserFilterStrategyFactory userFilterStrategyFactory, ISecurityLogger securityLogger,
     IAppRoleManager roleManager, IAppUserManager userManager)
     : base(
         baseBeforeAddingEntityLogics, baseAfterAddingEntityLogics, baseAfterUpdateEntityLogics,
         baseBeforeUpdateEntityLogics, baseBeforeDeleteEntityLogics, baseAfterDeleteEntityLogics, identityManager,
         accessManager, userDataSrv)
 {
     _userDataSrv = userDataSrv;
     _userFilterStrategyFactory = userFilterStrategyFactory;
     _securityLogger = securityLogger;
     _roleManager = roleManager;
     _userManager = userManager;
 }
コード例 #10
0
 public UsersManagerController(IAppUserManager userManager, IAppRoleManager roleManager, IFileWorker fileWorker)
 {
     _fileWorker  = fileWorker;
     _userManager = userManager;
     _roleManager = roleManager;
 }
コード例 #11
0
 public UserFilterStrategyFactory(IAppRoleManager roleManager)
 {
     _roleManager = roleManager;
 }
コード例 #12
0
 public IdentityUnitOfWork(IRecordContext dbContext, IAppUserManager userManager, IAppRoleManager roleManager)
 {
     _db         = dbContext;
     UserManager = userManager;
     RoleManager = roleManager;
 }
コード例 #13
0
 public GetRolesListQueryHandler(IAppRoleManager roleManager)
 {
     _roleManager = roleManager;
 }
コード例 #14
0
 public InitDataBaseCommandHandler(IRepository <TicketCategory, int> ticketCategoryRepo,
                                   IAppRoleManager roleManager)
 {
     _ticketCategoryRepo = ticketCategoryRepo;
     _roleManager        = roleManager;
 }
コード例 #15
0
 public FilterSupervisorUserStrategy(IAppRoleManager roleManager)
 {
     _roleManager = roleManager;
 }
コード例 #16
0
 public RolesManagerController(IAppRoleManager roleManager)
 {
     _roleManager = roleManager;
 }
コード例 #17
0
 public RoleManagementController(IAppRoleManager roleManager)
 {
     _roleManager = roleManager;
 }
 public FilterSupervisorAndAdminstratorUserStrategy(IAppRoleManager roleManager)
 {
     _roleManager            = roleManager;
     _supervisorUserStrategy = new FilterSupervisorUserStrategy(_roleManager);
 }
コード例 #19
0
 public WebWorkContext(IAppUserManager userManager, IUnitOfWork unitOfWork, IAppRoleManager appRoleManager)
 {
     _userManager    = userManager;
     _unitOfWork     = unitOfWork;
     _appRoleManager = appRoleManager;
 }