]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.cms/src/org/argeo/cms/internal/kernel/CmsState.java
Use deploy config for node user admin
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / kernel / CmsState.java
index 23d2f266d89325c71dc99bc168498340049b37ab..87fae05cf2af4333c97078af43c6b3c48c6a3a6c 100644 (file)
@@ -100,16 +100,22 @@ public class CmsState implements NodeState {
                bc.registerService(RepositoryFactory.class, repositoryFactory, null);
 
                // Security
+//             UserDirectoryServiceFactory userDirectoryServiceFactory = new UserDirectoryServiceFactory();
+//             shutdownHooks.add(() -> userDirectoryServiceFactory.shutdown());
+//             bc.registerService(ManagedServiceFactory.class, userDirectoryServiceFactory,
+//                             LangUtils.init(Constants.SERVICE_PID, NodeConstants.NODE_USER_DIRECTORIES_FACTORY_PID));
+
                NodeUserAdmin userAdmin = new NodeUserAdmin();
                shutdownHooks.add(() -> userAdmin.destroy());
                Dictionary<String, Object> props = userAdmin.currentState();
                props.put(Constants.SERVICE_PID, NodeConstants.NODE_USER_ADMIN_PID);
-               bc.registerService(UserAdmin.class, userAdmin, props);
+               bc.registerService(ManagedServiceFactory.class, userAdmin, props);
 
                // UI
                bc.registerService(ApplicationConfiguration.class, new MaintenanceUi(),
                                LangUtils.init(KernelConstants.CONTEXT_NAME_PROP, "system"));
-               bc.registerService(ApplicationConfiguration.class, new UserUi(), LangUtils.init(KernelConstants.CONTEXT_NAME_PROP, "user"));
+               bc.registerService(ApplicationConfiguration.class, new UserUi(),
+                               LangUtils.init(KernelConstants.CONTEXT_NAME_PROP, "user"));
        }
 
        private void initTransactionManager() {