- Timestamp:
- 01/05/10 10:31:40 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Security.Core/3.2/PermissionManager.cs
r1751 r2591 14 14 public class PermissionManager : IPermissionManager{ 15 15 16 private static ISessionFactory factory = ServiceLocator.GetSessionFactory(); 16 private static ISessionFactory factory; 17 private static ISessionFactory Factory { 18 get { 19 // lazy initialization 20 if(factory==null) 21 factory = ServiceLocator.GetSessionFactory(); 22 return factory; 23 } 24 } 17 25 18 26 private static ISession session; … … 51 59 public Guid Authenticate(String userName, String password) { 52 60 try { 53 session = factory.GetSessionForCurrentThread();61 session = Factory.GetSessionForCurrentThread(); 54 62 55 63 password = getMd5Hash(password); … … 96 104 if (existsSession) { 97 105 try { 98 session = factory.GetSessionForCurrentThread();106 session = Factory.GetSessionForCurrentThread(); 99 107 100 108 IPermissionOwnerAdapter permOwnerAdapter = session.GetDataAdapter<PermissionOwner, IPermissionOwnerAdapter>();
Note: See TracChangeset
for help on using the changeset viewer.