- Timestamp:
- 05/20/16 13:01:12 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/WebLoginService.cs
r13847 r13854 25 25 private List<HiveAdminClientWeb> adminclients; 26 26 private List<HiveWebUser> loggedinUsers; 27 private List<QueryWebClient> queryclients; 27 28 /// <summary> 28 29 /// Service instance that keeps all the information per user seperated. Data is in different lists so … … 54 55 adminclients = new List<HiveAdminClientWeb>(); 55 56 loggedinUsers = new List<HiveWebUser>(); 57 queryclients = new List<QueryWebClient>(); 56 58 } 57 59 /// <summary> … … 75 77 accessclients.Add(new AccessAdministrationClient(log.userId)); 76 78 adminclients.Add(new HiveAdminClientWeb(log.userId)); 77 loggedinUsers.Add(new HiveWebUser(log.userId, log.loginName).updateUserInfo()); 79 loggedinUsers.Add(new HiveWebUser(log.userId, log.loginName, false).updateUserInfo()); 80 queryclients.Add(new QueryWebClient(log.userId)); 81 } 82 public void newLoginOKBOnly(LoginViewModel log, QueryWebClient qwc) 83 { 84 destroyPossiblePreviousSessions(log.loginName); 85 var ind = loggedIn.Find(x => x.loginName == log.loginName); 86 if (ind != null) 87 { 88 logout(ind.userId); 89 } 90 loggedIn.Add(log); 91 queryclients.Add(qwc); 92 loggedinUsers.Add(new HiveWebUser(log.userId, log.loginName, true).updateUserInfo()); 93 78 94 } 79 95 /// <summary> … … 149 165 return adminclients.Find(x => x.userId == id); 150 166 } 167 public QueryWebClient getQueryClient(Guid id) 168 { 169 return queryclients.Find(x => x.UserId == id); 170 } 151 171 public HiveWebUser getCurrentUser(Guid id) 152 172 { … … 166 186 accessclients.RemoveAll(x => x.userId == id); 167 187 adminclients.RemoveAll(x => x.userId == id); 188 queryclients.RemoveAll(x => x.UserId == id); 168 189 loggedIn.RemoveAll(x => x.userId == id); 169 190 loggedinUsers.RemoveAll(x => x.webIdToken == id); 191 170 192 } 171 193 }
Note: See TracChangeset
for help on using the changeset viewer.