Exemplo n.º 1
0
 public NewsConsole
 (
     NewsManager newsManager,
     NewsQueryService newsQueries,
     NewsSecurityService newsSecurity,
     IContextAccessor <UserContext> userContextAccessor
 )
 {
     _newsManager         = newsManager;
     _newsQueries         = newsQueries;
     _newsSecurity        = newsSecurity;
     _userContextAccessor = userContextAccessor;
 }
Exemplo n.º 2
0
 public OptionsMenu(NewsSecurityService newsSecurity)
 {
     MenuItems = new List <IMenuItem>()
     {
         new MenuItemSecureCustom()
         {
             Title             = "Manage My News",
             Url               = "javascript: void $.console('news')",
             Icon              = IconType.Theme,
             SortOrder         = 10,
             AuthorizeCallback = user => {
                 return(newsSecurity.AuthorizeForCreate());
             }
         }
     };
 }
Exemplo n.º 3
0
 public NewsConsoleController
 (
     NewsManager newsManager,
     NewsQueryService newsQueries,
     NewsSecurityService newsSecurity,
     ContentManager contentManager,
     IContextAccessor <UserContext> userContextAccessor,
     IContextAccessor <SiteContext> siteContextAccessor
 )
 {
     _newsManager         = newsManager;
     _newsQueries         = newsQueries;
     _newsSecurity        = newsSecurity;
     _contentManager      = contentManager;
     _userContextAccessor = userContextAccessor;
 }
Exemplo n.º 4
0
 public NewsPublicController
 (
     NewsDbContext newsDbContext,
     NewsManager newsManager,
     NewsQueryService newsQueryService,
     NewsSecurityService newsSecurity,
     NewsWidgetService newsWidgetService,
     IContextAccessor <UserContext> userContextAccessor
 )
 {
     _NewsDbContext       = newsDbContext;
     _newsManager         = newsManager;
     _newsQueryService    = newsQueryService;
     _newsSecurity        = newsSecurity;
     _newsWidgetService   = newsWidgetService;
     _userContextAccessor = userContextAccessor;
 }
Exemplo n.º 5
0
        public ContentMenu(NewsSecurityService newsSecurity, IHttpContextAccessor httpContextAccessor)
        {
            var httpContext = httpContextAccessor.HttpContext;
            var returnUrl   = httpContext.Request.GetRelativeUrlEncoded();

            MenuItems = new List <IMenuItem>()
            {
                new MenuItemSecureCustom()
                {
                    Title             = "News Post",
                    Url               = "javascript: void $.console('news', '/sys/console/News/posts/create')",
                    Icon              = IconType.Theme,
                    AuthorizeCallback = user => {
                        return(newsSecurity.AuthorizeForCreate());
                    }
                }
            };
        }
Exemplo n.º 6
0
        public NewsApiController
        (
            NewsManager NewsManager,
            NewsQueryService NewsQueries,
            NewsSecurityService NewsSecurity,
            CategoryManager categoryManager,
            ContentManager contentManager,
            TagManager tagManager,
            IContextAccessor <UserContext> userContextAccessor
        )
        {
            _NewsManager     = NewsManager;
            _NewsQueries     = NewsQueries;
            _NewsSecurity    = NewsSecurity;
            _categoryManager = categoryManager;
            _contentManager  = contentManager;
            _tagManager      = tagManager;

            _userContextAccessor = userContextAccessor;
        }
Exemplo n.º 7
0
 public NewsQueryService(NewsSecurityService newsSecurity, NewsDbContext newsDbContext, IContextAccessor <UserContext> userContextAccessor)
 {
     _newsDbContext       = newsDbContext;
     _newsSecurity        = newsSecurity;
     _userContextAccessor = userContextAccessor;
 }