Beispiel #1
0
 public ApiKeyAuthenticationHandler(IOptionsMonitor <AuthenticationSchemeOptions> options, ILoggerFactory logger,
                                    UrlEncoder encoder, ISystemClock clock, IIdentityService identityService, IWebWorkContext workContext)
     : base(options, logger, encoder, clock)
 {
     _identityService = identityService;
     _workContext     = workContext;
 }
 public ProductsController(
     ILog logger,
     IProductService productService,
     IWebWorkContext workContext)
 {
     _logger         = logger;
     _productService = productService;
     _workContext    = workContext;
 }
Beispiel #3
0
 public PageApiController(
     IPageService service,
     IPageVersionService pageVersionService,
     IWebWorkContext workContext)
     : base(service)
 {
     this.pageVersionService = pageVersionService;
     this.workContext        = workContext;
 }
 public CommonController(IWebWorkContext webWorkContext,
                         ILanguageService languageService,
                         IPictureService pictureService,
                         ILoginModelService loginModelService)
 {
     this._webWorkContext    = webWorkContext;
     this._languageService   = languageService;
     this._pictureService    = pictureService;
     this._loginModelService = loginModelService;
 }
Beispiel #5
0
 public NavigationManager(
     IEnumerable <INavigationProvider> providers,
     IHttpContextAccessor httpContextAccessor,
     IWebWorkContext workContext,
     Lazy <ILogger> logger,
     UrlHelper urlHelper,
     IAuthorizationService authorizationService = null)
 {
     this.authorizationService = authorizationService;
     this.httpContextAccessor  = httpContextAccessor;
     this.logger      = logger;
     this.providers   = providers;
     this.urlHelper   = urlHelper;
     this.workContext = workContext;
 }
Beispiel #6
0
 private IEnumerable <MenuItem> Reduce(IEnumerable <MenuItem> items, IWebWorkContext workContext)
 {
     foreach (var item in items)
     {
         if (authorizationService == null || (!item.Permissions.Any() || item.Permissions.Any(x => authorizationService.TryCheckAccess(x, workContext.CurrentUser))))
         {
             yield return(new MenuItem
             {
                 Items = Reduce(item.Items, workContext),
                 Permissions = item.Permissions,
                 Position = item.Position,
                 RouteValues = item.RouteValues,
                 Text = item.Text,
                 CssClass = item.CssClass,
                 IconCssClass = item.IconCssClass,
                 Url = item.Url,
                 Href = item.Href
             });
         }
     }
 }
Beispiel #7
0
 public StyleRegister(IWebWorkContext workContext)
     : base(workContext)
 {
     urlHelper = EngineContext.Current.Resolve <UrlHelper>();
 }
Beispiel #8
0
 public ScriptRegister(IWebWorkContext workContext, WebPageBase viewPage = null)
     : base(workContext)
 {
     this.viewPage = viewPage;
     urlHelper     = EngineContext.Current.Resolve <UrlHelper>();
 }
Beispiel #9
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="workContext">Work context</param>
 public MobileDeviceHelper(IWebWorkContext workContext)
 {
     this._workContext = workContext;
 }
Beispiel #10
0
 protected ResourceRegister(IWebWorkContext workContext)
 {
     resourcesManager = EngineContext.Current.Resolve <IResourcesManager>();
     this.workContext = workContext;
 }