Search in sources :

Example 1 with UserManager

use of com.gitblit.manager.UserManager in project gitblit by gitblit.

the class RedisTicketServiceTest method getService.

@Override
protected ITicketService getService(boolean deleteAll) throws Exception {
    IStoredSettings settings = getSettings(deleteAll);
    XssFilter xssFilter = new AllowXssFilter();
    IRuntimeManager runtimeManager = new RuntimeManager(settings, xssFilter).start();
    IPluginManager pluginManager = new PluginManager(runtimeManager).start();
    INotificationManager notificationManager = new NotificationManager(settings).start();
    IUserManager userManager = new UserManager(runtimeManager, pluginManager).start();
    IRepositoryManager repositoryManager = new RepositoryManager(runtimeManager, pluginManager, userManager).start();
    RedisTicketService service = (RedisTicketService) new RedisTicketService(runtimeManager, pluginManager, notificationManager, userManager, repositoryManager).start();
    if (deleteAll) {
        service.deleteAll(getRepository());
    }
    return service;
}
Also used : NotificationManager(com.gitblit.manager.NotificationManager) INotificationManager(com.gitblit.manager.INotificationManager) IUserManager(com.gitblit.manager.IUserManager) IStoredSettings(com.gitblit.IStoredSettings) IRuntimeManager(com.gitblit.manager.IRuntimeManager) RuntimeManager(com.gitblit.manager.RuntimeManager) IRepositoryManager(com.gitblit.manager.IRepositoryManager) IRuntimeManager(com.gitblit.manager.IRuntimeManager) IPluginManager(com.gitblit.manager.IPluginManager) PluginManager(com.gitblit.manager.PluginManager) RedisTicketService(com.gitblit.tickets.RedisTicketService) INotificationManager(com.gitblit.manager.INotificationManager) IUserManager(com.gitblit.manager.IUserManager) UserManager(com.gitblit.manager.UserManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) XssFilter(com.gitblit.utils.XssFilter) IPluginManager(com.gitblit.manager.IPluginManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) IRepositoryManager(com.gitblit.manager.IRepositoryManager) RepositoryManager(com.gitblit.manager.RepositoryManager)

Example 2 with UserManager

use of com.gitblit.manager.UserManager in project gitblit by gitblit.

the class UITicketTest method getService.

protected ITicketService getService(boolean deleteAll) throws Exception {
    IStoredSettings settings = getSettings(deleteAll);
    XssFilter xssFilter = new AllowXssFilter();
    IRuntimeManager runtimeManager = new RuntimeManager(settings, xssFilter).start();
    IPluginManager pluginManager = new PluginManager(runtimeManager).start();
    INotificationManager notificationManager = new NotificationManager(settings).start();
    IUserManager userManager = new UserManager(runtimeManager, pluginManager).start();
    IRepositoryManager repositoryManager = new RepositoryManager(runtimeManager, pluginManager, userManager).start();
    BranchTicketService service = (BranchTicketService) new BranchTicketService(runtimeManager, pluginManager, notificationManager, userManager, repositoryManager).start();
    if (deleteAll) {
        service.deleteAll(repo);
    }
    return service;
}
Also used : BranchTicketService(com.gitblit.tickets.BranchTicketService) INotificationManager(com.gitblit.manager.INotificationManager) NotificationManager(com.gitblit.manager.NotificationManager) IUserManager(com.gitblit.manager.IUserManager) IStoredSettings(com.gitblit.IStoredSettings) IRuntimeManager(com.gitblit.manager.IRuntimeManager) RuntimeManager(com.gitblit.manager.RuntimeManager) IRepositoryManager(com.gitblit.manager.IRepositoryManager) IRuntimeManager(com.gitblit.manager.IRuntimeManager) IPluginManager(com.gitblit.manager.IPluginManager) PluginManager(com.gitblit.manager.PluginManager) INotificationManager(com.gitblit.manager.INotificationManager) IUserManager(com.gitblit.manager.IUserManager) UserManager(com.gitblit.manager.UserManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) XssFilter(com.gitblit.utils.XssFilter) IPluginManager(com.gitblit.manager.IPluginManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) IRepositoryManager(com.gitblit.manager.IRepositoryManager) RepositoryManager(com.gitblit.manager.RepositoryManager)

Example 3 with UserManager

use of com.gitblit.manager.UserManager in project gitblit by gitblit.

the class HtpasswdAuthenticationTest method newHtpasswdAuthentication.

private HtpasswdAuthProvider newHtpasswdAuthentication(IStoredSettings settings) {
    XssFilter xssFilter = new AllowXssFilter();
    RuntimeManager runtime = new RuntimeManager(settings, xssFilter, GitBlitSuite.BASEFOLDER).start();
    UserManager users = new UserManager(runtime, null).start();
    HtpasswdAuthProvider htpasswd = new HtpasswdAuthProvider();
    htpasswd.setup(runtime, users);
    return htpasswd;
}
Also used : UserManager(com.gitblit.manager.UserManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) XssFilter(com.gitblit.utils.XssFilter) RuntimeManager(com.gitblit.manager.RuntimeManager) HtpasswdAuthProvider(com.gitblit.auth.HtpasswdAuthProvider) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter)

Example 4 with UserManager

use of com.gitblit.manager.UserManager in project gitblit by gitblit.

the class HtpasswdAuthenticationTest method newAuthenticationManager.

private AuthenticationManager newAuthenticationManager(IStoredSettings settings) {
    XssFilter xssFilter = new AllowXssFilter();
    RuntimeManager runtime = new RuntimeManager(settings, xssFilter, GitBlitSuite.BASEFOLDER).start();
    UserManager users = new UserManager(runtime, null).start();
    HtpasswdAuthProvider htpasswd = new HtpasswdAuthProvider();
    htpasswd.setup(runtime, users);
    AuthenticationManager auth = new AuthenticationManager(runtime, users);
    auth.addAuthenticationProvider(htpasswd);
    return auth;
}
Also used : AuthenticationManager(com.gitblit.manager.AuthenticationManager) UserManager(com.gitblit.manager.UserManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) XssFilter(com.gitblit.utils.XssFilter) RuntimeManager(com.gitblit.manager.RuntimeManager) HtpasswdAuthProvider(com.gitblit.auth.HtpasswdAuthProvider) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter)

Example 5 with UserManager

use of com.gitblit.manager.UserManager in project gitblit by gitblit.

the class LuceneExecutorTest method newLuceneExecutor.

private LuceneService newLuceneExecutor() {
    MemorySettings settings = new MemorySettings();
    settings.put(Keys.git.repositoriesFolder, GitBlitSuite.REPOSITORIES);
    XssFilter xssFilter = new AllowXssFilter();
    RuntimeManager runtime = new RuntimeManager(settings, xssFilter, GitBlitSuite.BASEFOLDER).start();
    UserManager users = new UserManager(runtime, null).start();
    RepositoryManager repos = new RepositoryManager(runtime, null, users);
    return new LuceneService(settings, repos);
}
Also used : UserManager(com.gitblit.manager.UserManager) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) XssFilter(com.gitblit.utils.XssFilter) RuntimeManager(com.gitblit.manager.RuntimeManager) MemorySettings(com.gitblit.tests.mock.MemorySettings) AllowXssFilter(com.gitblit.utils.XssFilter.AllowXssFilter) RepositoryManager(com.gitblit.manager.RepositoryManager) LuceneService(com.gitblit.service.LuceneService)

Aggregations

RuntimeManager (com.gitblit.manager.RuntimeManager)12 UserManager (com.gitblit.manager.UserManager)12 XssFilter (com.gitblit.utils.XssFilter)12 AllowXssFilter (com.gitblit.utils.XssFilter.AllowXssFilter)12 RepositoryManager (com.gitblit.manager.RepositoryManager)6 IRuntimeManager (com.gitblit.manager.IRuntimeManager)5 IUserManager (com.gitblit.manager.IUserManager)5 IStoredSettings (com.gitblit.IStoredSettings)4 INotificationManager (com.gitblit.manager.INotificationManager)4 IPluginManager (com.gitblit.manager.IPluginManager)4 IRepositoryManager (com.gitblit.manager.IRepositoryManager)4 NotificationManager (com.gitblit.manager.NotificationManager)4 PluginManager (com.gitblit.manager.PluginManager)4 AuthenticationManager (com.gitblit.manager.AuthenticationManager)3 HtpasswdAuthProvider (com.gitblit.auth.HtpasswdAuthProvider)2 RedmineAuthProvider (com.gitblit.auth.RedmineAuthProvider)2 BranchTicketService (com.gitblit.tickets.BranchTicketService)2 IUserService (com.gitblit.IUserService)1 LdapAuthProvider (com.gitblit.auth.LdapAuthProvider)1 FederationManager (com.gitblit.manager.FederationManager)1