Changeset 16723 for branches/2521_ProblemRefactoring/HeuristicLab.Services.Access/3.3/UserManager.cs
- Timestamp:
- 03/28/19 16:54:20 (6 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Services.Access
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/branches/2520_PersistenceReintegration/HeuristicLab.Services.Access merged eligible /branches/2839_HiveProjectManagement/HeuristicLab.Services.Access merged eligible /branches/2947_ConfigurableIndexedDataTable/HeuristicLab.Services.Access merged eligible /branches/2965_CancelablePersistence/HeuristicLab.Services.Access merged eligible /stable/HeuristicLab.Services.Access merged eligible /trunk/HeuristicLab.Services.Access merged eligible /branches/1721-RandomForestPersistence/HeuristicLab.Services.Access 10321-10322 /branches/2892_LR-prediction-intervals/HeuristicLab.Services.Access 15743-16388 /branches/2915-AbsoluteSymbol/HeuristicLab.Services.Access 15943-16355 /branches/Algorithms.GradientDescent/HeuristicLab.Services.Access 5516-5520 /branches/Benchmarking/sources/HeuristicLab.Services.Access 6917-7005 /branches/CloningRefactoring/HeuristicLab.Services.Access 4656-4721 /branches/CodeEditor/HeuristicLab.Services.Access 11700-11806 /branches/DataAnalysis Refactoring/HeuristicLab.Services.Access 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Services.Access 5815-6180 /branches/DataAnalysis/HeuristicLab.Services.Access 4458-4459,4462,4464 /branches/DataPreprocessing/HeuristicLab.Services.Access 10085-11101 /branches/GP.Grammar.Editor/HeuristicLab.Services.Access 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Services.Access 5060 /branches/HLScript/HeuristicLab.Services.Access 10331-10358 /branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Services.Access 11570-12508 /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Services.Access 6123-9799 /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Services.Access 11130-12721 /branches/HiveProjectManagement/HeuristicLab.Services.Access 15377-15760 /branches/HiveStatistics/sources/HeuristicLab.Services.Access 12440-12877 /branches/LogResidualEvaluator/HeuristicLab.Services.Access 10202-10483 /branches/NET40/sources/HeuristicLab.Services.Access 5138-5162 /branches/NSGA-II Changes/HeuristicLab.Services.Access 12033-12122 /branches/ParallelEngine/HeuristicLab.Services.Access 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Services.Access 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Services.Access 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Services.Access 6828 /branches/RuntimeOptimizer/HeuristicLab.Services.Access 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.Services.Access 7787-8333 /branches/SlaveShutdown/HeuristicLab.Services.Access 8944-8956 /branches/SpectralKernelForGaussianProcesses/HeuristicLab.Services.Access 10204-10479 /branches/SuccessProgressAnalysis/HeuristicLab.Services.Access 5370-5682 /branches/Trunk/HeuristicLab.Services.Access 6829-6865 /branches/UnloadJobs/HeuristicLab.Services.Access 9168-9215 /branches/VNS/HeuristicLab.Services.Access 5594-5752 /branches/crossvalidation-2434/HeuristicLab.Services.Access 12948-12950 /branches/histogram/HeuristicLab.Services.Access 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/2521_ProblemRefactoring/HeuristicLab.Services.Access/3.3/UserManager.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 46 46 public string GetUserNameById(Guid userId) { 47 47 var user = GetUserById(userId); 48 if (user != null ) {48 if (user != null && !string.IsNullOrWhiteSpace(user.UserName)) { 49 49 return user.UserName; 50 50 } else { … … 52 52 } 53 53 54 } 55 56 public IEnumerable<Guid> GetUserGroupIdsOfUser(Guid userId) { 57 using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) { 58 var groupIds = from g in context.UserGroupUserGroups 59 where g.UserGroupId == userId 60 select g.UserGroupUserGroupId; 61 62 var query = from g in context.UserGroupBases.OfType<DA.UserGroup>() 63 where groupIds.Contains(g.Id) 64 select g.Id; 65 66 return query.ToList(); 67 } 54 68 } 55 69 … … 74 88 } 75 89 return false; 90 } 91 92 public IEnumerable<DataTransfer.UserGroupMapping> GetUserGroupMapping() { 93 using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) { 94 var query = from u in context.UserGroupUserGroups 95 select Convert.ToDto(u); 96 return query.ToList(); 97 } 76 98 } 77 99
Note: See TracChangeset
for help on using the changeset viewer.