public SectionController() { sectionService = ServiceLocator.Current.GetInstance<ISectionService>(); sectionLocaleService = ServiceLocator.Current.GetInstance<ISectionLocaleService>(); permissionService = ServiceLocator.Current.GetInstance<IPermissionCommonService>(); permissionsHelper = ServiceLocator.Current.GetInstance<IPermissionsHelper>(); }
/// <summary> /// public ctor - will generally just be used for unit testing /// </summary> /// <param name="contentService"></param> /// <param name="mediaService"></param> /// <param name="contentTypeService"></param> /// <param name="dataTypeService"></param> /// <param name="fileService"></param> /// <param name="localizationService"></param> /// <param name="packagingService"></param> /// <param name="entityService"></param> /// <param name="relationService"></param> /// <param name="sectionService"></param> /// <param name="treeService"></param> /// <param name="tagService"></param> public ServiceContext( IContentService contentService, IMediaService mediaService, IContentTypeService contentTypeService, IDataTypeService dataTypeService, IFileService fileService, ILocalizationService localizationService, PackagingService packagingService, IEntityService entityService, IRelationService relationService, ISectionService sectionService, IApplicationTreeService treeService, ITagService tagService) { _tagService = new Lazy<ITagService>(() => tagService); _contentService = new Lazy<IContentService>(() => contentService); _mediaService = new Lazy<IMediaService>(() => mediaService); _contentTypeService = new Lazy<IContentTypeService>(() => contentTypeService); _dataTypeService = new Lazy<IDataTypeService>(() => dataTypeService); _fileService = new Lazy<IFileService>(() => fileService); _localizationService = new Lazy<ILocalizationService>(() => localizationService); _packagingService = new Lazy<PackagingService>(() => packagingService); _entityService = new Lazy<IEntityService>(() => entityService); _relationService = new Lazy<IRelationService>(() => relationService); _sectionService = new Lazy<ISectionService>(() => sectionService); _treeService = new Lazy<IApplicationTreeService>(() => treeService); }
public SectionController(ISectionService SectionService, ILookupService lookupService, IClassService ClassService) : base() { this._SectionService = SectionService; this._lookupService = lookupService; this._ClassService = ClassService; }
public StudentsController(IStudentService StudentsService, ILookupService lookupService, IStudentsParentService StudentsParentService, IStudentsMedicalService StudentsMedicalService, IStudentsTransportService StudentsTransportService, IStudentsDocsService StudentsDocsService, IAcademicYearService AcademicYearService, IClassService ClassService, ISectionService SectionService, IBatchService BatchService, IAreaService AreaService, IStudentsAttendanceService StudentsAttendanceService, IStudentsClassService StudentsClassService) : base() { this._StudentService = StudentsService; this._StudentsParentService = StudentsParentService; this._StudentsMedicalService = StudentsMedicalService; this._StudentsTransportService = StudentsTransportService; this._StudentsDocsService = StudentsDocsService; this._StudentsClassService = StudentsClassService; this._AcademicYearService = AcademicYearService; this._ClassService = ClassService; this._SectionService = SectionService; this._BatchService = BatchService; this._AreaService = AreaService; this._lookupService = lookupService; this._StudentsAttendanceService = StudentsAttendanceService; }
public void Init() { // this.userRepo = TestObjectFactory.GetUsersRepository(); this.sectionsRepo = TestObjectFactory.GetSectionsRepository(); this.sectionsService = new SectionService(this.sectionsRepo); }
/// <summary> /// Constructor. /// </summary> public BaseSectionController( BaseControllerArgs args, IClassroomService classroomService, ISectionService sectionService) : base(args, classroomService) { SectionService = sectionService; }
public AdminController(IUserService userService, ISectionService sectionService, IRequestService requestService, ICategoryService categoryService) { _userService = userService; _sectionService = sectionService; _requestService = requestService; _categoryService = categoryService; }
public ProfilesApiController(ISectionService SectionService, IUserDataService userDataService, IOfficeHourServices OfficeHourServices) { _sectionService = SectionService; _officeHours = OfficeHourServices; _userDataService = userDataService; }
public TopicsController(ITopicsServices topics, IZipFilesService zipFiles, ISectionService sections, IExamplesService examples, IUsersService usersService, ICloudStorageService drive) { this.topics = topics; this.sections = sections; this.examples = examples; this.zipFiles = zipFiles; this.users = usersService; this.cloudStorage = drive; }
public PagesController(INodeService nodeService, ITemplateService templateService, IFileService fileService, ISectionService sectionService, IModelValidator<Node> modelValidator, ModuleLoader moduleLoader) { _nodeService = nodeService; _templateService = templateService; _fileService = fileService; _sectionService = sectionService; this.ModelValidator = modelValidator; _moduleLoader = moduleLoader; }
//private ActionCollection _inboundActions; //private ActionCollection _outboundActions; public CuyAccordionModule(ICommonDao commonDao, ICuyAccordionDao cuyAccordionDao, ISectionService sectionService) { this._commonDao = commonDao; this._cuyAccordionDao = cuyAccordionDao; this._sectionService = sectionService; //InitInboundActions(); //InitOutboundActions(); }
/// <summary> /// Constructor. /// </summary> public StudentController( BaseControllerArgs args, IClassroomService classroomService, ISectionService sectionService, IUserService userService) : base(args, classroomService, sectionService) { UserService = userService; }
/// <summary> /// Default constructor. /// </summary> public AdminBasePage() { this._activeNode = null; this._siteService = Container.Resolve<ISiteService>(); this._nodeService = Container.Resolve<INodeService>(); this._sectionService = Container.Resolve<ISectionService>(); this._moduleLoader = Container.Resolve<ModuleLoader>(); }
public AdminWebService() { this._cuyahogaContainer = IoC.Container; this._commonDao = CuyahogaContainer.Resolve<ICommonDao>(); this._siteService = CuyahogaContainer.Resolve<ISiteService>(); this._sectionService = CuyahogaContainer.Resolve<ISectionService>(); this._nodeService = CuyahogaContainer.Resolve<INodeService>(); this._userService = CuyahogaContainer.Resolve<IUserService>(); }
public SectionsController(ISectionService sectionService, INodeService nodeService, ModuleLoader moduleLoader, SectionModelValidator modelValidator, ITemplateService templateService, IModuleTypeService moduleTypeService) { _sectionService = sectionService; _templateService = templateService; _moduleTypeService = moduleTypeService; _nodeService = nodeService; _moduleLoader = moduleLoader; ModelValidator = modelValidator; }
//private ActionCollection _inboundActions; //private ActionCollection _outboundActions; public CuyaLightBoxModule(ICommonDao commonDao, ICuyaLightBoxDao cuyaLightBoxDao, IFileService fileService, ISectionService sectionService) { this._commonDao = commonDao; this._cuyaLightBoxDao = cuyaLightBoxDao; this._fileService = fileService; this._sectionService = sectionService; //InitInboundActions(); //InitOutboundActions(); }
public ModeratorController(ISectionService sectionService, ICategoryService categoryService, IRequestService requestService, ILotImageService lotRequestService, ILotService lotService) { _sectionService = sectionService; _categoryService = categoryService; _requestService = requestService; _lotRequestService = lotRequestService; _lotService = lotService; }
public void Init() { this.controller = MyWebApi.Controller<SectionsController>() .WithResolvedDependencyFor(TestObjectFactory.GetSectionService()); this.controllerWithMockedNotFoundService = MyWebApi.Controller<SectionsController>() .WithResolvedDependencyFor(TestObjectFactory.GetSectionServiceNotFoundMock()); this.sectionsService = TestObjectFactory.GetSectionService(); }
/// <summary> /// Constructor. /// </summary> public CheckpointController( BaseControllerArgs args, IClassroomService classroomService, ISectionService sectionService, IProjectService projectService, ICheckpointService checkpointService) : base(args, classroomService, projectService) { SectionService = sectionService; CheckpointService = checkpointService; }
public LotController(ICategoryService categoryService, ISectionService sectionService, ILotService lotService, IUserService userService, ILotImageService lotRequestService, IBidService bidService) { _sectionService = sectionService; _categoryService = categoryService; _lotService = lotService; _userService = userService; _lotImageService = lotRequestService; _bidService = bidService; }
/// <summary> /// Default constructor calls base constructor with parameters for templatecontrol, /// templatepath and stylesheet. /// </summary> public ModuleAdminBasePage() : base("ModuleAdminTemplate.ascx", "~/Controls/", "~/Admin/Css/Admin.css") { this._node = null; this._section = null; this._moduleLoader = Container.Resolve<ModuleLoader>(); this._searchService = Container.Resolve<ISearchService>(); this._sectionService = Container.Resolve<ISectionService>(); this._nodeService = Container.Resolve<INodeService>(); }
public EnquiryController(IEnquiryService EnquiryService, ILookupService lookupService, IAcademicYearService AcademicYearService, IClassService ClassService, ISectionService SectionService) : base() { this._EnquiryService = EnquiryService; this._lookupService = lookupService; this._AcademicYearService = AcademicYearService; this._ClassService = ClassService; this._SectionService = SectionService; }
/// <summary> /// Default constructor. /// </summary> public AdminBasePage() { this._activeNode = null; this._siteService = Container.Resolve<ISiteService>(); this._userService = Container.Resolve<IUserService>(); this._nodeService = Container.Resolve<INodeService>(); this._sectionService = Container.Resolve<ISectionService>(); this._moduleTypeService = Container.Resolve<IModuleTypeService>(); this._moduleLoader = Container.Resolve<ModuleLoader>(); this._templateService = Container.Resolve<ITemplateService>(); this._fileService = Container.Resolve<IFileService>(); }
public ComplaintController(IComplaintService ComplaintService, ILookupService lookupService, IAcademicYearService AcademicYearService, IClassService ClassService, ISectionService SectionService, IStudentService StudentService) : base() { this._ComplaintService = ComplaintService; this._lookupService = lookupService; this._AcademicYearService = AcademicYearService; this._ClassService = ClassService; this._SectionService = SectionService; this._StudentService = StudentService; }
public ReportController(IExamService ExamService, ILookupService lookupService, IExamSubjectsService IExamSubjectsService, IExamMarksDetailIsService IExamMarksDetailIsService, IAcademicYearService AcademicYearService, IClassService ClassService, ISectionService SectionService, IExamMarksService IExamMarksService) : base() { this._ExamService = ExamService; this._lookupService = lookupService; this._IExamSubjectsService = IExamSubjectsService; _IExamMarksDetailIsService = IExamMarksDetailIsService; this._AcademicYearService = AcademicYearService; this._ClassService = ClassService; this._SectionService = SectionService; _IExamMarksService = IExamMarksService; }
public static bool AuthorizeAccess(IDashboardControl dashboardTab, IUser user, ISectionService sectionService) { if (user.Id.ToString() == Constants.System.Root.ToInvariantString()) { return true; } var denyTypes = dashboardTab.AccessRights.Rules.Where(x => x.Action == AccessType.Deny).ToArray(); var grantedTypes = dashboardTab.AccessRights.Rules.Where(x => x.Action == AccessType.Grant).ToArray(); var grantedBySectionTypes = dashboardTab.AccessRights.Rules.Where(x => x.Action == AccessType.GrantBySection).ToArray(); return CheckUserAccessByRules(user, sectionService, denyTypes, grantedTypes, grantedBySectionTypes); }
/// <summary> /// Default constructor. /// </summary> public PageEngine() { this._activeNode = null; this._activeSection = null; this._templateControl = null; this._shouldLoadContent = true; // Get services from the container. Ideally, it should be possible to register the aspx page in the container // to automatically resolve dependencies but there were memory issues with registering pages in the container. this._moduleLoader = Container.Resolve<ModuleLoader>(); this._nodeService = Container.Resolve<INodeService>(); this._siteService = Container.Resolve<ISiteService>(); this._sectionService = Container.Resolve<ISectionService>(); }
/// <summary> /// Constructor. /// </summary> public AssignmentController( BaseControllerArgs args, IClassroomService classroomService, IAssignmentService assignmentService, ISectionService sectionService, IQuestionService questionService, IUserService userService) : base(args, classroomService) { AssignmentService = assignmentService; SectionService = sectionService; QuestionService = questionService; UserService = userService; }
/// <summary> /// Constructor. /// </summary> public UserController( BaseControllerArgs args, IIdentityProvider identityProvider, IUserService userService, IClassroomService classroomService, ISectionService sectionService, WebAppHost webAppHost) : base(args) { _userService = userService; _identityProvider = identityProvider; _classroomService = classroomService; _sectionService = sectionService; _webAppHost = webAppHost; }
public static bool CheckUserAccessByRules(IUser user, ISectionService sectionService, IAccessItem[] denyTypes, IAccessItem[] grantedTypes, IAccessItem[] grantedBySectionTypes) { var allowedSoFar = false; //Check if this item as any grant-by-section arguments, if so check if the user has access to any of the sections approved, if so they will // be allowed to see it (so far) if (grantedBySectionTypes.Any()) { var allowedApps = sectionService.GetAllowedSections(Convert.ToInt32(user.Id)) .Select(x => x.Alias) .ToArray(); var allApprovedSections = grantedBySectionTypes.SelectMany(g => g.Value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)).ToArray(); if (allApprovedSections.Any(allowedApps.Contains)) { allowedSoFar = true; } } //Check if this item as any grant arguments, if so check if the user is one of the user types approved, if so they will // be allowed to see it (so far) if (grantedTypes.Any()) { var allApprovedUserTypes = grantedTypes.SelectMany(g => g.Value.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries)).ToArray(); if (allApprovedUserTypes.InvariantContains(user.UserType.Alias)) { allowedSoFar = true; } } else { //if there are not explicit grant types then everyone is allowed so far and we'll only disallow on a deny basis allowedSoFar = true; } //Check if this item as any deny arguments, if so check if the user is one of the user types approved, if so they will // be denied to see it no matter what if (denyTypes.Any()) { var allDeniedUserTypes = denyTypes.SelectMany(g => g.Value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)).ToArray(); if (allDeniedUserTypes.InvariantContains(user.UserType.Alias)) { allowedSoFar = false; } } return allowedSoFar; }
public EmployeeController(IEmployeeProfileService employeeService, IJobService jobService, IOfferService offerService, ISectionService sectionService, ISkillService skillService, ICommitProvider commitProvider) { _employeeService = employeeService; _jobService = jobService; _offerService = offerService; _sectionService = sectionService; _skillService = skillService; _commitProvider = commitProvider; }
public SectionsController(ISectionService sectionService) { this.sectionService = sectionService; }
public CoursesController(ICourseService courseService, ISectionService sectionService) { this.courseService = courseService; this.sectionService = sectionService; }
public SectionItemService(IPointExUow uow, ISectionService sectionService, IClock clock) { _sectionService = sectionService; _clock = clock; Uow = uow; }
public DataSeeder(IAuthService authService, ICourseService courseService, IUserService userService, ICategoryService categoryService, ISectionService sectionService, ILessonService lessonService) { _authService = authService; _courseService = courseService; _userService = userService; _catService = categoryService; _secService = sectionService; _lesService = lessonService; }
public HomeController(ISectionService sectionService, IPostService postService, IUserService userService) { this.sectionService = sectionService; this.postService = postService; this.userService = userService; }
public SectionController(ISectionService sectionService) { _sectionService = sectionService; }
public DashboardService(ISectionService sectionService, DashboardCollection dashboardCollection, ILocalizedTextService localizedText) { _sectionService = sectionService ?? throw new ArgumentNullException(nameof(sectionService)); _dashboardCollection = dashboardCollection ?? throw new ArgumentNullException(nameof(dashboardCollection)); _localizedText = localizedText ?? throw new ArgumentNullException(nameof(localizedText)); }
public SectionBaseController(IWebPageService webPageService, ISectionService sectionService, IWebHelper webHelper) { _webPageService = webPageService; _sectionService = sectionService; _webHelper = webHelper; }
public ConferenceController(ISectionService service) { _service = service; _logger = LogManager.GetCurrentClassLogger(); }
public SectionsController(ISectionService iSectionService, IMapper imapper) { _iSectionService = iSectionService; _iMapper = imapper; }
public ForumController(ISectionService service) { _sectionService = service; }
public SectionController(ISectionService SectionService) { _SectionService = SectionService; }
public HomeController(ILogger <HomeController> logger, ICourseService courseService, ILessonService lessonService, ITestService testService, IQuestionService questionService, ISectionService sectionService, IUserService userService, ICertificateService certificateService) { this.logger = logger; this.courseService = courseService; this.lessonService = lessonService; this.testService = testService; this.questionService = questionService; this.sectionService = sectionService; this.userService = userService; this.certificateService = certificateService; }
public static bool AuthorizeAccess(IDashboardControl dashboardControl, IUser user, ISectionService sectionService) { return(CheckUserAccessByRules(user, sectionService, dashboardControl.AccessRights.Rules)); }
public HomeController(IUser_InfoService Iuser_service, INewsService inewsService, ISectionService isectionService) { this.iuserService = Iuser_service; this._InewsService = inewsService; this._IsectionService = isectionService; }
public static bool CheckUserAccessByRules(IUser user, ISectionService sectionService, IEnumerable <IAccessRule> rules) { if (user.Id == Constants.Security.SuperUserId) { return(true); } var(denyRules, grantRules, grantBySectionRules) = GroupRules(rules); var hasAccess = true; string[] assignedUserGroups = null; // if there are no grant rules, then access is granted by default, unless denied // otherwise, grant rules determine if access can be granted at all if (grantBySectionRules.Length > 0 || grantRules.Length > 0) { hasAccess = false; // check if this item has any grant-by-section arguments. // if so check if the user has access to any of the sections approved, if so they will be allowed to see it (so far) if (grantBySectionRules.Length > 0) { var allowedSections = sectionService.GetAllowedSections(user.Id).Select(x => x.Alias).ToArray(); var wantedSections = grantBySectionRules.SelectMany(g => g.Value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)).ToArray(); if (wantedSections.Intersect(allowedSections).Any()) { hasAccess = true; } } // if not already granted access, check if this item as any grant arguments. // if so check if the user is in one of the user groups approved, if so they will be allowed to see it (so far) if (hasAccess == false && grantRules.Any()) { assignedUserGroups = user.Groups.Select(x => x.Alias).ToArray(); var wantedUserGroups = grantRules.SelectMany(g => g.Value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)).ToArray(); if (wantedUserGroups.Intersect(assignedUserGroups).Any()) { hasAccess = true; } } } if (!hasAccess || denyRules.Length == 0) { return(false); } // check if this item has any deny arguments, if so check if the user is in one of the denied user groups, if so they will // be denied to see it no matter what assignedUserGroups = assignedUserGroups ?? user.Groups.Select(x => x.Alias).ToArray(); var deniedUserGroups = denyRules.SelectMany(g => g.Value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)).ToArray(); if (deniedUserGroups.Intersect(assignedUserGroups).Any()) { hasAccess = false; } return(hasAccess); }
public ThreadController(IMapper mapper, IThreadService threadService, ISectionService sectionService) { _mapper = mapper; _threadService = threadService; _sectionService = sectionService; }
public AdminSectionsApiController(ISectionService sectionService) { this._sectionService = sectionService; }
public CatalogController(ICategoryService categoryService, ICatalogModelFactory catalogModelFactory, ISectionService sectionService) { _categoryService = categoryService; _catalogModelFactory = catalogModelFactory; _sectionService = sectionService; }
public UserController(IUserService iuserService, IuserGroupService iuserGroupService, ISectionService isectionService) { this._iuserService = iuserService; this._iuserGroupService = iuserGroupService; this._isectionService = isectionService; }
public PageController(ISectionService sectionService, IPageService pageService) : base(pageService) { _sectionService = sectionService; _pageService = pageService; }
public SectionController(ISectionService sections) { _sections = sections; }
public GalleryService(IRepository <PhotoGallery> photoGalleryRepository, IRepository <PhotoGalleryMapping> photoGalleryMapRepository, ISectionService sectionService, IEventPublisher eventPublisher) { this._photoGalleryRepository = photoGalleryRepository; this._photoGalleryMapRepository = photoGalleryMapRepository; this._sectionService = sectionService; this._eventPublisher = eventPublisher; }
public UserMapDefinition(ILocalizedTextService textService, IUserService userService, IEntityService entityService, ISectionService sectionService, AppCaches appCaches, ActionCollection actions, IGlobalSettings globalSettings) { _sectionService = sectionService; _entityService = entityService; _userService = userService; _textService = textService; _actions = actions; _appCaches = appCaches; _globalSettings = globalSettings; }
public ApplicationTreeController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, ITreeService treeService, ISectionService sectionService, UmbracoHelper umbracoHelper) : base(globalSettings, umbracoContextAccessor, sqlContext, services, appCaches, logger, runtimeState, umbracoHelper) { _treeService = treeService; _sectionService = sectionService; }
public TestsController(ITestService testService, ISectionService sectionService, IQuestionService questionService) { this.testService = testService; this.sectionService = sectionService; this.questionService = questionService; }
public GallerySidebarModule(ISectionService sectionService) { _sectionService = sectionService; }
public SectionController(ISectionService service, ICourseService courseService, IUmsFacade umsFacade) { _service = service; _courseService = courseService; _umsFacade = umsFacade; }
//webpage public static WebPageModel ToModel(this WebPage entity, IWebPageService webPageService, ISectionService sectionService) { if (entity == null) { return(null); } bool userIsAdmin = webPageService.IsAdminCurrentUser(); bool userHasEditRights = webPageService.HasEditRights(entity.Id); bool userHasCreateRights = webPageService.HasCreateRights(entity.Id); var model = new WebPageModel() { Id = entity.Id, //SidebarVisible = entity.SidebarEnabled, UserHasCreateRights = userHasCreateRights, AvailableSections = sectionService.GetAvailableSections().Select(x => new SelectListItem { Text = x }) }; foreach (var sectionEntity in entity.Sections) { var sm = GetSectionModel(sectionEntity); sm.Id = sectionEntity.Id; sm.WebPage = sectionEntity.WebPage; sm.UserHasEditRights = userHasEditRights; sm.UserIsAdmin = userIsAdmin; model.Sections.Add(sm); } return(model); }