Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/UserController.cs @ 13689

Last change on this file since 13689 was 13689, checked in by jlodewyc, 8 years ago

#2582 Implemented uploading

File size: 1.3 KB
Line 
1using HeuristicLab.Clients.Hive.WebJobManager.Services;
2using Microsoft.AspNet.Hosting;
3using Microsoft.AspNet.Mvc;
4using System;
5using System.Collections.Generic;
6using System.Linq;
7using System.ServiceModel.Security;
8using System.Threading.Tasks;
9
10namespace HeuristicLab.Clients.Hive.WebJobManager.Controllers
11{
12    public class UserController: Controller
13    {
14        private HiveServiceClient client;
15        private IHostingEnvironment _environment;
16
17        public UserController(IHostingEnvironment env)
18        {
19            HiveServiceLocatorWebManagerService hiveServiceLocator = (HiveServiceLocatorWebManagerService)HiveServiceLocatorWebManagerService.Instance;
20            client = hiveServiceLocator.getHiveServiceClient();
21
22            _environment = env;
23        }
24        public IActionResult Index()
25        {
26            if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
27            {
28               
29                ViewBag.Title = "User management";
30                return View("Index");
31            }
32            else
33            {
34                HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
35                return RedirectToAction("Index", "Home");
36            }
37        }
38    }
39}
Note: See TracBrowser for help on using the repository browser.