Changeset 13754 for branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/ResourceController.cs
- Timestamp:
- 04/12/16 15:28:19 (8 years ago)
- 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; 1 using HeuristicLab.Clients.Access.Administration; 2 using HeuristicLab.Clients.Hive.WebJobManager.Services; 2 3 using Microsoft.AspNet.Hosting; 3 4 using Microsoft.AspNet.Http; … … 15 16 private WebLoginService weblog; 16 17 private HiveServiceLocatorWeb serviceLocator; 17 private HiveServiceClient serviceClient; 18 private HiveClientWeb clientWeb; 18 private AccessAdministrationClient accessClient; 19 19 private Guid userId; 20 20 … … 26 26 _environment = env; 27 27 } 28 private voidinit()28 private bool init() 29 29 { 30 30 var u = HttpContext.Session.GetString("UserId"); 31 31 if (u == null || u == "" || Guid.Parse(u) == Guid.Empty) 32 32 { 33 userId = Guid.Empty; 34 serviceLocator = new HiveServiceLocatorWeb(); 35 serviceClient = serviceLocator.getHiveServiceClient(); 36 clientWeb = new HiveClientWeb(serviceLocator, userId); 33 return false; 37 34 } 38 35 else … … 40 37 userId = Guid.Parse(u); 41 38 serviceLocator = weblog.getServiceLocator(userId); 42 serviceClient = serviceLocator.getHiveServiceClient(); 43 clientWeb = weblog.getClientWeb(userId); 39 accessClient = weblog.getAccessAdminClient(userId); 40 return serviceLocator.CheckLogin(); 41 44 42 } 45 43 } 46 44 public IActionResult Index() 47 45 { 48 init();49 if ( serviceLocator.CheckLogin())46 47 if (init()) 50 48 { 51 49 ViewBag.SessionId = HttpContext.Session.GetString("UserId"); 52 50 ViewBag.Title = "Resources"; 53 51 return View("Index");
Note: See TracChangeset
for help on using the changeset viewer.