Free cookie consent management tool by TermsFeed Policy Generator

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

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

#2582 Last fixes Job Manager

File size: 1.2 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            HiveServiceLocatorWeb hiveServiceLocator = (HiveServiceLocatorWeb)HiveServiceLocatorWeb.Instance;
20            client = hiveServiceLocator.getHiveServiceClient();
21
22            _environment = env;
23        }
24        public IActionResult Index()
25        {
26            if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin())
27            {
28               
29                ViewBag.Title = "User management";
30                return View("Index");
31            }
32            else
33            {
34                HiveServiceLocatorWeb.SetLoginErrorMessage();
35                return RedirectToAction("Index", "Home");
36            }
37        }
38    }
39}
Note: See TracBrowser for help on using the repository browser.