Vitaliy Filippov
2015-09-29 b4d9581961d219f6a8fbfd0e391b39d7e45e8e10
src/main/java/com/gitblit/manager/GitblitManager.java
@@ -54,6 +54,7 @@
import com.gitblit.Constants.Role;
import com.gitblit.GitBlitException;
import com.gitblit.IStoredSettings;
import com.gitblit.extensions.RepositoryLifeCycleListener;
import com.gitblit.models.FederationModel;
import com.gitblit.models.FederationProposal;
import com.gitblit.models.FederationSet;
@@ -77,7 +78,6 @@
import com.gitblit.transport.ssh.IPublicKeyManager;
import com.gitblit.transport.ssh.SshKey;
import com.gitblit.utils.ArrayUtils;
import com.gitblit.utils.HttpUtils;
import com.gitblit.utils.JsonUtils;
import com.gitblit.utils.ObjectCache;
import com.gitblit.utils.StringUtils;
@@ -88,8 +88,8 @@
import com.google.gson.reflect.TypeToken;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.Singleton;
import com.google.inject.Provider;
import com.google.inject.Singleton;
/**
 * GitblitManager is an aggregate interface delegate.  It implements all the manager
@@ -277,6 +277,16 @@
      // add this clone to the cached model
      repositoryManager.addToCachedRepositoryList(cloneModel);
      if (pluginManager != null) {
         for (RepositoryLifeCycleListener listener : pluginManager.getExtensions(RepositoryLifeCycleListener.class)) {
            try {
               listener.onFork(repository, cloneModel);
            } catch (Throwable t) {
               logger.error(String.format("failed to call plugin onFork %s", repository.name), t);
            }
         }
      }
      return cloneModel;
   }
@@ -441,7 +451,7 @@
         // Read bundled Gitblit properties to extract setting descriptions.
         // This copy is pristine and only used for populating the setting
         // models map.
         InputStream is = GitblitManager.class.getResourceAsStream("/reference.properties");
         InputStream is = GitblitManager.class.getResourceAsStream("/defaults.properties");
         BufferedReader propertiesReader = new BufferedReader(new InputStreamReader(is));
         StringBuilder description = new StringBuilder();
         SettingModel setting = new SettingModel();
@@ -486,9 +496,9 @@
         }
         propertiesReader.close();
      } catch (NullPointerException e) {
         logger.error("Failed to find resource copy of gitblit.properties");
         logger.error("Failed to find classpath resource 'defaults.properties'");
      } catch (IOException e) {
         logger.error("Failed to load resource copy of gitblit.properties");
         logger.error("Failed to load classpath resource 'defaults.properties'");
      }
   }
@@ -652,6 +662,11 @@
   }
   @Override
   public UserModel authenticate(String username) {
      return authenticationManager.authenticate(username);
   }
   @Override
   public UserModel authenticate(HttpServletRequest httpRequest, boolean requiresCertificate) {
      UserModel user = authenticationManager.authenticate(httpRequest, requiresCertificate);
      if (user == null) {