Changeset 1750
- Timestamp:
- 05/07/09 13:56:08 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Security.Core/3.2/PermissionManager.cs
r1738 r1750 50 50 /// <returns></returns> 51 51 public Guid Authenticate(String userName, String password) { 52 lock (locker)53 if (currentSessions.Values.Contains(userName))54 return GetGuid(userName);55 52 try { 56 53 session = factory.GetSessionForCurrentThread(); … … 63 60 if (user != null && 64 61 user.Password.Equals(password)) { 65 Guid newSessionId = Guid.NewGuid(); 66 lock (locker) 67 currentSessions.Add(newSessionId, userName); 68 return newSessionId; 69 } else return Guid.Empty; 62 Guid sessionId; 63 64 lock (locker) { 65 if (currentSessions.Values.Contains(userName)) { 66 sessionId = Guid.NewGuid(); 67 } else { 68 sessionId = GetGuid(userName); 69 currentSessions.Add(sessionId, userName); 70 } 71 } 72 73 return sessionId; 74 } else 75 return Guid.Empty; 70 76 } 71 77 catch (Exception ex) { throw new FaultException("Server: " + ex.Message); }
Note: See TracChangeset
for help on using the changeset viewer.