Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/05/10 10:31:40 (15 years ago)
Author:
gkronber
Message:

Copied refactored plugin infrastructure from branch and merged changeset r2586:2589 from branch into the trunk. #799

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Security.Core/3.2/PermissionManager.cs

    r1751 r2591  
    1414  public class PermissionManager : IPermissionManager{
    1515
    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    }
    1725
    1826    private static ISession session;
     
    5159    public Guid Authenticate(String userName, String password) {
    5260      try {
    53         session = factory.GetSessionForCurrentThread();
     61        session = Factory.GetSessionForCurrentThread();
    5462
    5563        password = getMd5Hash(password);
     
    96104      if (existsSession) {
    97105        try {
    98           session = factory.GetSessionForCurrentThread();
     106          session = Factory.GetSessionForCurrentThread();
    99107         
    100108          IPermissionOwnerAdapter permOwnerAdapter = session.GetDataAdapter<PermissionOwner, IPermissionOwnerAdapter>();
Note: See TracChangeset for help on using the changeset viewer.