Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/20/16 13:01:12 (9 years ago)
Author:
jlodewyc
Message:

#2582 Core update, pre migration

File:
1 edited

Legend:

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

    r13847 r13854  
    2525        private List<HiveAdminClientWeb> adminclients;
    2626        private List<HiveWebUser> loggedinUsers;
     27        private List<QueryWebClient> queryclients;
    2728        /// <summary>
    2829        /// Service instance that keeps all the information per user seperated. Data is in  different lists so
     
    5455            adminclients = new List<HiveAdminClientWeb>();
    5556            loggedinUsers = new List<HiveWebUser>();
     57            queryclients = new List<QueryWebClient>();
    5658        }
    5759        /// <summary>
     
    7577            accessclients.Add(new AccessAdministrationClient(log.userId));
    7678            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           
    7894        }
    7995        /// <summary>
     
    149165            return adminclients.Find(x => x.userId == id);
    150166        }
     167        public QueryWebClient getQueryClient(Guid id)
     168        {
     169            return queryclients.Find(x => x.UserId == id);
     170        }
    151171        public HiveWebUser getCurrentUser(Guid id)
    152172        {
     
    166186            accessclients.RemoveAll(x => x.userId == id);
    167187            adminclients.RemoveAll(x => x.userId == id);
     188            queryclients.RemoveAll(x => x.UserId == id);
    168189            loggedIn.RemoveAll(x => x.userId == id);
    169190            loggedinUsers.RemoveAll(x => x.webIdToken == id);
     191
    170192        }
    171193    }
Note: See TracChangeset for help on using the changeset viewer.