Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/12/16 17:09:12 (9 years ago)
Author:
jlodewyc
Message:

#2582 Security access implemented, directory renaming and choosing, adding more partials

Location:
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Jobs/FileOpeningService.cs

    r13827 r13847  
    4343        public void NewModel()
    4444        {
    45             vm = new FileOpeningViewModel();
     45            vm = new FileOpeningViewModel(weblog.getCurrentUser(UserId));
    4646            Job = new RefreshableJob();
    4747
     
    8080            return null;
    8181        }
    82         public void SaveToFile(string file)
     82        public void SaveToFile(string file, string dname)
    8383        {
    8484            if(vm != null)
    8585            {
    8686                var uploads = Path.Combine(env.WebRootPath, "uploads", weblog.getServiceLocator(UserId).getHiveServiceClient().ClientCredentials.UserName.UserName,
    87                     "HiveChanged");
     87                    dname);
    8888                Directory.CreateDirectory(uploads);
    8989                var cont = Job.HiveTasks.First().ItemTask.Item;
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/WebLoginService.cs

    r13841 r13847  
    11using HeuristicLab.Clients.Access.Administration;
     2using HeuristicLab.Clients.Hive.WebJobManager.Models;
    23using HeuristicLab.Clients.Hive.WebJobManager.ViewModels;
    34using System;
     
    2324        private List<AccessAdministrationClient> accessclients;
    2425        private List<HiveAdminClientWeb> adminclients;
     26        private List<HiveWebUser> loggedinUsers;
    2527        /// <summary>
    2628        /// Service instance that keeps all the information per user seperated. Data is in  different lists so
     
    5153            accessclients = new List<AccessAdministrationClient>();
    5254            adminclients = new List<HiveAdminClientWeb>();
     55            loggedinUsers = new List<HiveWebUser>();
    5356        }
    5457        /// <summary>
     
    6770            loggedIn.Add(log);
    6871            locators.Add(loc);
    69             var temp = new HiveClientWeb(loc, log.userId);
    70             webclients.Add(temp);
    71             var temp2 = new FileOpeningService(log.userId);
    72             fileopeners.Add(temp2);
    73             temp2 = new FileOpeningService(log.userId);
    74             jobopeners.Add(temp2);
    75             var temp3 = new AccessAdministrationClient(log.userId);
    76             accessclients.Add(temp3);
    77             var temp4 = new HiveAdminClientWeb(log.userId);
    78             adminclients.Add(temp4);
     72            webclients.Add(new HiveClientWeb(loc, log.userId));
     73            fileopeners.Add(new FileOpeningService(log.userId));
     74            jobopeners.Add(new FileOpeningService(log.userId));
     75            accessclients.Add(new AccessAdministrationClient(log.userId));
     76            adminclients.Add(new HiveAdminClientWeb(log.userId));
     77            loggedinUsers.Add(new HiveWebUser(log.userId, log.loginName).updateUserInfo());
    7978        }
    8079        /// <summary>
     
    150149            return adminclients.Find(x => x.userId == id);
    151150        }
     151        public HiveWebUser getCurrentUser(Guid id)
     152        {
     153            return loggedinUsers.Find(x => x.webIdToken == id);
     154        }
    152155        /// <summary>
    153156        /// Removes all traces from the logged in user.
     
    164167            adminclients.RemoveAll(x => x.userId == id);
    165168            loggedIn.RemoveAll(x => x.userId == id);
    166 
     169            loggedinUsers.RemoveAll(x => x.webIdToken == id);
    167170        }
    168171    }
Note: See TracChangeset for help on using the changeset viewer.