Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/12/16 15:28:19 (8 years ago)
Author:
jlodewyc
Message:

#2582 User management done, start resource calendar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/ResourceController.cs

    r13740 r13754  
    1 using HeuristicLab.Clients.Hive.WebJobManager.Services;
     1using HeuristicLab.Clients.Access.Administration;
     2using HeuristicLab.Clients.Hive.WebJobManager.Services;
    23using Microsoft.AspNet.Hosting;
    34using Microsoft.AspNet.Http;
     
    1516        private WebLoginService weblog;
    1617        private HiveServiceLocatorWeb serviceLocator;
    17         private HiveServiceClient serviceClient;
    18         private HiveClientWeb clientWeb;
     18        private AccessAdministrationClient accessClient;
    1919        private Guid userId;
    2020
     
    2626            _environment = env;
    2727        }
    28         private void init()
     28        private bool init()
    2929        {
    3030            var u = HttpContext.Session.GetString("UserId");
    3131            if (u == null || u == "" || Guid.Parse(u) == Guid.Empty)
    3232            {
    33                 userId = Guid.Empty;
    34                 serviceLocator = new HiveServiceLocatorWeb();
    35                 serviceClient = serviceLocator.getHiveServiceClient();
    36                 clientWeb = new HiveClientWeb(serviceLocator, userId);
     33                return false;
    3734            }
    3835            else
     
    4037                userId = Guid.Parse(u);
    4138                serviceLocator = weblog.getServiceLocator(userId);
    42                 serviceClient = serviceLocator.getHiveServiceClient();
    43                 clientWeb = weblog.getClientWeb(userId);
     39                accessClient = weblog.getAccessAdminClient(userId);
     40                return serviceLocator.CheckLogin();
     41
    4442            }
    4543        }
    4644        public IActionResult Index()
    4745        {
    48             init();
    49             if (serviceLocator.CheckLogin())
     46           
     47            if (init())
    5048            {
    51 
     49                ViewBag.SessionId = HttpContext.Session.GetString("UserId");
    5250                ViewBag.Title = "Resources";
    5351                return View("Index");
Note: See TracChangeset for help on using the changeset viewer.