Esempio n. 1
35
 public BaseApiController(IUserService userService, IRoleService roleService)
 {
     UserService = userService;
     RoleService = roleService;
 }
Esempio n. 2
4
 public HomeController(IEmployeeService empserv, IRoleService roleserv)
 {
     employeeService = empserv;
     roleService     = roleserv;
 }
Esempio n. 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="context"></param>
 /// <param name="roleService"> </param>
 /// <param name="categoryNotificationService"> </param>
 /// <param name="categoryPermissionForRoleService"></param>
 public CategoryService(IMVCForumContext context, IRoleService roleService, ICategoryNotificationService categoryNotificationService, ICategoryPermissionForRoleService categoryPermissionForRoleService)
 {
     _roleService = roleService;
     _categoryNotificationService = categoryNotificationService;
     _categoryPermissionForRoleService = categoryPermissionForRoleService;
     _context = context as MVCForumContext;
 }
 public AccountController(IClientService clientService, IRoleService roleService, IUtilisateurService<Client> utilisateurService, IImageService imageService)
 {
     ClientService = clientService;
     RoleService = roleService;
     UtilisateurService = utilisateurService;
     ImageService = imageService;
 }
Esempio n. 5
0
 public PostService(ISettingsService settingsService, IRoleService roleService, IPostRepository postRepository, ITopicRepository topicRepository)
 {
     this._postRepository = postRepository;
     this._topicRepository = topicRepository;
     this._roleService = roleService;
     this._settingsService = settingsService;
 }
        public RolesBasedAuthorizationService(IRoleService roleService, IAuthorizationServiceEventHandler authorizationServiceEventHandler)
        {
            _roleService = roleService;
            _authorizationServiceEventHandler = authorizationServiceEventHandler;

            Logger = NullLogger.Instance;
        }
Esempio n. 7
0
 public UserTaskForms(
     IShapeFactory shapeFactory,
     IRoleService roleService) {
     _roleService = roleService;
     Shape = shapeFactory;
     T = NullLocalizer.Instance;
 }
Esempio n. 8
0
 public TagController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, ITopicTagService topicTagService, ICategoryService categoryService, ICacheService cacheService)
     : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService)
 {
     _topicTagService = topicTagService;
     _categoryService = categoryService;
     _cacheService = cacheService;
 }
Esempio n. 9
0
 public StatsController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, 
     ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, ITopicService topicService, IPostService postService)
     : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService)
 {
     _topicService = topicService;
     _postService = postService;
 }
Esempio n. 10
0
        public GuestRoleProvider(IRoleService roleService, IUnitOfWorkFactory unitOfWorkFactory)
        {
            using (var uow = unitOfWorkFactory.CreateSystem())
            {
                var role = roleService.GetAll(uow).FirstOrDefault(x => x.SystemRole == SystemRole.Base);

                if (role != null)
                {
                    List<Role> roles = role.Roles.SelectRecursive(x => x.Roles).Select(x => x.Item).Distinct().ToList();

                    roles.Add(role);

                    _roles = new List<Role>
                    {
                        new Role
                        {
                            ChildRoles = new List<ChildRole>(),
                            Name = "GustRole",
                            SystemRole = SystemRole.Base,
                            Permissions = roles
                                .SelectMany(m => m.Permissions)
                                .OrderBy(m => m.FullName)
                                .Select(x => new Permission(){
                                    FullName = x.FullName,
                                    AllowRead = x.AllowRead,
                                    AllowWrite = x.AllowWrite,
                                    AllowCreate = x.AllowCreate,
                                    AllowDelete = x.AllowDelete,
                                    AllowNavigate = x.AllowNavigate,
                                }).ToList()
                        }
                    };
                }
            }
        }
Esempio n. 11
0
 public RoleController(IRoleService roleService,
     IEnumerable<IPermissionProvider> permissionProviders,
     IRepository<RolePermission> rpRepository) {
     _roleService = roleService;
     _permissionProviders = permissionProviders;
     _rpRepository = rpRepository;
 }
Esempio n. 12
0
        public MemberController(IMemberService memberService, IUserService userService, IRoleService roleService, ILevelService levelService)
		{
			_memberService = memberService;
            _userService = userService;
            _roleService = roleService;
            _levelService = levelService;
        }
Esempio n. 13
0
 public EmployeController(IEmployeService employeService, IRoleService roleService, IUtilisateurService<Employe> utilisateurService, IImageService imageService)
 {
     EmployeService = employeService;
     RoleService = roleService;
     UtilisateurService = utilisateurService;
     ImageService = imageService;
 }
Esempio n. 14
0
 public void AddUsersToRoles()
 {
     var users = Builder<User>.CreateListOfSize(2).
         TheFirst(1).With(x => x.Login = "******").
         TheLast(1).With(x => x.Login = "******").Build();
     var roles = Builder<Role>.CreateListOfSize(2).
         TheFirst(1).With(x => x.RoleName = "User").
         TheLast(1).With( x => x.RoleName = "Admin").Build();
     _userRepository = Mockery.Stub<IUserRepository>();
     _roleRepository = Mockery.Stub<IRoleRepository>();
     using (Mockery.Record())
     {
         Expect.Call(_userRepository.GetUserByLogin("A")).Return(users[0]);
         Expect.Call(_userRepository.GetUserByLogin("B")).Return(users[1]);
         Expect.Call(_roleRepository.GetRoleByRoleName("User")).Return(roles[0]);
         Expect.Call(_roleRepository.GetRoleByRoleName("Admin")).Return(roles[1]);
     }
     using (Mockery.Playback())
     {
         _roleService = new RoleService(_roleRepository, _userRepository);
         _roleService.AddUsersToRoles(new[] {"A", "B"}, new[] {"User", "Admin"});
     }
     Assert.AreEqual(users[0].Roles.Count, 2);
     Assert.AreEqual(users[1].Roles.Count, 2);
 }
Esempio n. 15
0
 public UserService(IUserRepository userRepository, ISessionManager sesstionService, IRoleService roleService, ISettingService settingService, ISessionManager sessionManager)
 {
     _userRepository = userRepository;
     _roleService = roleService;
     _sessionManager = sessionManager;
     _settingService = settingService;
 }
 public WebCoreSecurityServiceBinder(IUserService userService, IRoleService roleService, IUserRolesService userRolesService, IRolePageRestrictionService rolePageRestrictionService)
 {
     this.userService = userService;
     this.roleService = roleService;
     this.userRolesService = userRolesService;
     this.rolePageRestrictionService = rolePageRestrictionService;
 }
Esempio n. 17
0
 public LeadController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     ISaleService saleService,
     ITaskService taskService,
     ViewDataHelper viewdataHelper,
     ICampaignService campaignService,
     ITagService tagService)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _saleService = saleService;
     _taskService = taskService;
     _viewdataHelper = viewdataHelper;
     _campaignService = campaignService;
     _tagService = tagService;
 }
Esempio n. 18
0
 public SnippetsController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, 
     ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService,
     IMembershipUserPointsService membershipUserPointsService, ICacheService cacheService)
     : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService, cacheService)
 {
     _membershipUserPointsService = membershipUserPointsService;
 }
Esempio n. 19
0
 public UsersService(
     IContentManager contentManager, 
     IOrchardServices orchardServices, 
     IRoleService roleService, 
     IMessageManager messageManager, 
     IScheduledTaskManager taskManager, 
     IRepository<EmailPartRecord> emailRepository, 
     ShellSettings shellSettings, 
     IRepository<UserRolesPartRecord> userRolesRepository, 
     ICacheManager cache, 
     IClock clock, 
     ISignals signals) 
 {
     _signals = signals;
     _clock = clock;
     _cache = cache;
     _emailRepository = emailRepository;
     _orchardServices = orchardServices;
     _contentManager = contentManager;
     _roleService = roleService;
     _messageManager = messageManager;
     _taskManager = taskManager;
     _shellSettings = shellSettings;
     _userRolesRepository = userRolesRepository;
     T = NullLocalizer.Instance;
     Logger = NullLogger.Instance;            
 }
 public SelectRolesForms(
     IShapeFactory shapeFactory,
     IRoleService roleService) {
     _roleService = roleService;
     Shape = shapeFactory;
     T = NullLocalizer.Instance;
 }
Esempio n. 21
0
 public Service(IProcessService processService, ISubProcessService subProcessService, IClassificationService classificationService, IRoleService roleService)
 {
     this.subProcessService = subProcessService;
     this.processService = processService;
     this.classificationService = classificationService;
     this.roleService = roleService;
 }
 public CmsPluginServiceBinder(IUserService userService, IRoleService roleService, IUserRolesService userRolesService, IEnquiryService enquiryService)
 {
     this.userService = userService;
     this.roleService = roleService;
     this.userRolesService = userRolesService;
     this.enquiryService = enquiryService;
 }
Esempio n. 23
0
 public DefaultUsersApiOperations(IUsersService users, IUserService user, IRolesService roles, IRoleService role)
 {
     Users = users;
     User = user;
     Roles = roles;
     Role = role;
 }
Esempio n. 24
0
 public UserController(IUnitOfWork uow, IUserService userService, IRoleService roleService, IFormsAuthenticationService formsAuthenticationService)
 {
     _uow = uow;
     _userService = userService;
     _roleService = roleService;
     _formsAuthenticationService = formsAuthenticationService;
 }
Esempio n. 25
0
 public MembersController(
     IMembershipService membershipService,
     IRoleService roleService)
 {
     _membershipService = membershipService;
     _roleService = roleService;
 }
Esempio n. 26
0
 public ToolsController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IUserService userService,
     ISettingsService settingsService,
     ILocalizationService localizationService,
     IRoleService roleService)
     : base(loggingService, unitOfWorkManager, userService, settingsService, localizationService)
 {
 }
Esempio n. 27
0
 public AssociateController(
     IMembershipService membershipService,
     IMembershipService associateMembershipService,
     IAssociateService associateService,
     IDocumentService documentService,
     IReferenceService referenceService,
     IEmployeeService employeeService,
     IProspectService prospectService,
     IPrincipal user,
     IClientProjectSharedService clientProjectSharedService,
     IIndividualService individualService,
     IRoleService roleService,
     Admin.Services.IEmailService emailService)
     : base(membershipService, associateService, user)
 {
     this.associateService = associateService;
     this.documentService = documentService;
     this.referenceService = referenceService;
     this.employeeService = employeeService;
     this.prospectService = prospectService;
     this.associateMembershipService = associateMembershipService;
     this.clientProjectSharedService = clientProjectSharedService;
     this.individualService = individualService;
     this.roleService = roleService;
     this.emailService = emailService;
 }
Esempio n. 28
0
 public GroupController(IRoleService _roleService
     , IGroupService _groupService
  )
 {
     roleService = _roleService;
     groupService = _groupService;
 }
Esempio n. 29
0
            //public UserController(IUserService userService)
            //{
            //    _userService = userService;
            //}

            public UserController(IUserService userService, ApplicationSignInManager signInManager, IRoleService roleService, IAuthenticationManager authenticationManager)
            {
                _userService = userService;
                _signInManager = signInManager;
                _roleService = roleService;
                _authManager = authenticationManager;
            }
Esempio n. 30
0
 public FileController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, 
     ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, IUploadedFileService uploadedFileService, ICategoryService categoryService, ICacheService cacheService)
     : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService, cacheService)
 {
     _uploadedFileService = uploadedFileService;
     _categoryService = categoryService;
 }
Esempio n. 31
0
 public HomeController(IArtistService artistService, ISongService songService, IUserService userService, IRoleService roleService)
 {
     this._userService = userService;
     this._artistService = artistService;
     this._songService = songService;
     this._roleService = roleService;
 }
Esempio n. 32
0
 /// <summary>
 /// 经纪人管理初始化
 /// </summary>
 /// <param name="clientInfoService">clientInfoService</param>
 /// <param name="workContext">workContext</param>
 /// <param name="brokerService">brokerService</param>
 /// <param name="partnerlistService">partnerlistService</param>
 /// <param name="recommendagentService">recommendagentService</param>
 /// <param name="roleService">roleService</param>
 /// <param name="MessageService">MessageService</param>
 /// <param name="userService">userService</param>
 public BrokerInfoController(IClientInfoService clientInfoService,
     IWorkContext workContext,
     IBrokerService brokerService,
     IPartnerListService partnerlistService,
     IRecommendAgentService recommendagentService,
     IRoleService roleService,
     IMessageDetailService MessageService,
     IUserService userService,
     IBrokeAccountService brokerAccountService,
     IEventOrderService eventOrderService,
     IInviteCodeService inviteCodeService,
     ILevelService levelService,
     IAgentBillService agentBillService,
     IEventService eventService
     )
 {
     _clientInfoService = clientInfoService;
     _workContext = workContext;
     _brokerService = brokerService;
     _partnerlistService = partnerlistService;
     _recommendagentService = recommendagentService;
     _roleService = roleService;
     _MessageService = MessageService;
     _userService = userService;
     _brokerAccountService = brokerAccountService;
     _eventOrderService = eventOrderService;
     _inviteCodeService = inviteCodeService;
     _levelService = levelService;
     _agentBillService = agentBillService;
     _eventService = eventService;
 }
Esempio n. 33
0
 public UserController(IUserService userSvc, IRoleService roleSvc, ITeamService teamSvc)
 {
     _userSvc = userSvc;
     _roleSvc = roleSvc;
     _teamSvc = teamSvc;
 }
Esempio n. 34
0
 public AccountController(IUserService service, IRoleService roleService, IActivityService activityService)
 {
     this.service         = service;
     this.roleService     = roleService;
     this.activityService = activityService;
 }
Esempio n. 35
0
        public static Dictionary <Category, PermissionSet> GetPermissionsForTopics(IEnumerable <Topic> topics, IRoleService roleService, MembershipRole usersRole)
        {
            // Get all the categories for this topic collection
            var categories = topics.Select(x => x.Category).Distinct();

            // Permissions
            // loop through the categories and get the permissions
            var permissions = new Dictionary <Category, PermissionSet>();

            foreach (var category in categories)
            {
                var permissionSet = roleService.GetPermissions(category, usersRole);
                permissions.Add(category, permissionSet);
            }
            return(permissions);
        }
Esempio n. 36
0
 public LoginController(ILoginService loginService, IUserService userService, IRoleService roleService)
 {
     _loginService = loginService;
     _userService  = userService;
     _roleService  = roleService;
 }
Esempio n. 37
0
 public UserController(IUserService _UserService, IMenuFunctionService _MenuFunctionService, IUserRoleService _UserRoleService, IRoleService _RoleService, IUserConfigService _UserConfigService)
 {
     this._UserService         = _UserService;
     this._MenuFunctionService = _MenuFunctionService;
     this._UserRoleService     = _UserRoleService;
     this._RoleService         = _RoleService;
     this._UserConfigService   = _UserConfigService;
 }
Esempio n. 38
0
        public SubscriptionTask(IPlanService planService, IUniquePageService uniquepageService, IPageMessageSvc pageMessageSvc, IHelperService helperService, IServicesService serviceSvc, IProviderService Providersvc, ILogAdminService logger, ICompanyService companyService, UserService userService, IRoleService roleService, IEmailSender emailSender, MailSettings mailSettings, IEnrolleeService enrolleeService)
        {
            _planService       = planService;
            _uniquePageService = uniquepageService;
            _pageMessageSvc    = pageMessageSvc;
            _helperSvc         = helperService;
            _serviceSvc        = serviceSvc;
            _providerSvc       = Providersvc;
            _logger            = logger;
            _companySvc        = companyService;
            _userservice       = userService;
            _rolesvc           = roleService;
            _emailSender       = emailSender;
            _mailSettings      = mailSettings;

            _enrolleeService = enrolleeService;
        }
Esempio n. 39
0
 public UserService(IUserRepository userRepository, IRoleService roleService)
 {
     _userRepository = userRepository;
     _roleService    = roleService;
 }
 public CompanyController(ICustomerService CustomerService, IUserService UserService, IRoleService RoleService, IUserRoleService UserRoleService, IFormService FormService, IRoleDetailService RoleDetailService, ICompanyService CompanyService,
                          ICityService CityService, ICountryService CountryService, IStateService StateService)
     : base(CustomerService, UserService, RoleService, FormService, RoleDetailService, UserRoleService)
 {
     this._CompanyService = CompanyService;
     this._CityService    = CityService;
     this._CountryService = CountryService;
     this._StateService   = StateService;
 }
Esempio n. 41
0
 public RoleController(IRoleService roleService)
 {
     this.roleService = roleService;
 }
Esempio n. 42
0
 public RoleController(IRoleService roleServices)
 {
     _roleServices = roleServices;
 }
Esempio n. 43
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="RoleController" /> class
 /// </summary>
 /// <param name="roleService">The role service which is used to communicate with the logic layer.</param>
 /// <param name="userService">The user service which is used to communicate with the logic layer.</param>
 /// <param name="mapper">The mapper which is used to convert the resources to the model to the resource result.</param>
 public RoleController(IRoleService roleService, IUserService userService, IMapper mapper)
 {
     this.roleService = roleService;
     this.userService = userService;
     this.mapper      = mapper;
 }
 public RoleApiService(IRoleService roleService)
 {
     _roleService = roleService;
 }
Esempio n. 45
0
 public RoleController(IRoleService service)
 {
     _service = service;
 }
Esempio n. 46
0
 public EditModel(IUserService service, IRoleService svcRole)
 {
     _service = service;
     _svcRole = svcRole;
 }
Esempio n. 47
0
 public AdminController(IUserService userService, IRoleService roleService)
 {
     _userService = userService;
     _roleService = roleService;
 }
 public EffectiveRolesConnectorDriver(INotifier notifier, IRoleService roleService)
 {
     _notifier    = notifier;
     _roleService = roleService;
     T            = NullLocalizer.Instance;
 }
 public BaseResourceAuthorizationHandler(IRoleService roleService)
 {
     _roleService = roleService;
 }
Esempio n. 50
0
 public BlogManagerController(IPostService postService, IPostImageService postImageService, IImageService imageService, IPostCategoryService postCategoryService, IUserService userService, IRoleService roleService)
 {
     _postService         = postService;
     _postImageService    = postImageService;
     _imageService        = imageService;
     _postCategoryService = postCategoryService;
     _userService         = userService;
     _roleService         = roleService;
 }
Esempio n. 51
0
 /// <summary>
 /// 初始化一个<see cref="RoleController"/>类型的实例
 /// </summary>
 /// <param name="service">角色服务</param>
 /// <param name="queryService">角色查询服务</param>
 public RoleController(IRoleService service, IQueryRoleService queryService) : base(service)
 {
     RoleService      = service;
     QueryRoleService = queryService;
 }
Esempio n. 52
0
 public PageController(IPageService pageService, IPageSectionService sectionService, IAnalyticsService analyticService, IUserService userService, ILoginService loginService, IRoleService roleService)
 {
     _pageService     = pageService;
     _sectionService  = sectionService;
     _analyticService = analyticService;
     _userService     = userService;
     _loginService    = loginService;
     _roleService     = roleService;
 }
Esempio n. 53
0
 public RolesController(IRoleService roleSvc)
 {
     _roleSvc = roleSvc;
 }
Esempio n. 54
0
 public TagController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IMembershipService membershipService, ILocalizationService localizationService, IRoleService roleService, ISettingsService settingsService, ITopicTagService topicTagService, ICategoryService categoryService, ICacheService cacheService)
     : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService)
 {
     _topicTagService = topicTagService;
     _categoryService = categoryService;
     _cacheService    = cacheService;
 }
Esempio n. 55
0
        public HomeController(ILoggingService loggingService, IUnitOfWorkManager unitOfWorkManager, IActivityService activityService, IMembershipService membershipService,
                              ITopicService topicService, ILocalizationService localizationService, IRoleService roleService,
                              ISettingsService settingsService, ICategoryService categoryService)
            : base(loggingService, unitOfWorkManager, membershipService, localizationService, roleService, settingsService)
        {
            _topicService    = topicService;
            _categoryService = categoryService;
            _activityService = activityService;

            LoggedOnUser = UserIsAuthenticated ? MembershipService.GetUser(Username) : null;
            UsersRole    = LoggedOnUser == null?RoleService.GetRole(AppConstants.GuestRoleName) : LoggedOnUser.Roles.FirstOrDefault();
        }
Esempio n. 56
0
 public PermissionController(IRoleService roleService, IPermissionService permissionService)
 {
     _roleService       = roleService;
     _permissionService = permissionService;
 }
Esempio n. 57
0
 public RoleController(IEnumerable <IPermissionProvider> permissionProviders, IRoleService roleService)
 {
     _permissionProviders = permissionProviders.OrderBy(p => p.Position);
     _roleService         = roleService;
 }
 public RoleController(IRoleService roleService)
 {
     _roleService = roleService;
 }
Esempio n. 59
0
 public RoleController(IRoleDataService roleDataService, IRoleService roleService)
 {
     _roleDataService = roleDataService;
     _roleService     = roleService;
 }
Esempio n. 60
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="roleService"></param>
 /// <param name="membershipService"></param>
 public RolesController(IRoleService roleService, IMembershipService membershipService)
 {
     this.roleService       = roleService;
     this.membershipService = membershipService;
 }