Skip to content

Commit

Permalink
Update JAMES SHA1
Browse files Browse the repository at this point in the history
  • Loading branch information
quantranhong1999 committed Dec 27, 2024
1 parent baf3d80 commit 55b23bf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion james-project
Submodule james-project updated 24 files
+14 −1 docs/modules/servers/partials/configure/jvm.adoc
+6 −0 docs/modules/servers/partials/configure/usersrepository.adoc
+15 −6 mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreRightManager.java
+52 −5 mailbox/store/src/test/java/org/apache/james/mailbox/store/StoreRightManagerTest.java
+8 −0 protocols/netty/src/main/java/org/apache/james/protocols/netty/BasicChannelInboundHandler.java
+4 −1 server/apps/cassandra-app/docker-configuration/jvm.properties
+4 −1 server/apps/cassandra-app/sample-configuration/jvm.properties
+4 −1 server/apps/distributed-app/docker-configuration/jvm.properties
+4 −1 server/apps/distributed-app/sample-configuration/jvm.properties
+12 −0 server/apps/distributed-app/sample-configuration/usersrepository.xml
+4 −1 server/apps/distributed-pop3-app/docker-configuration/jvm.properties
+4 −1 server/apps/distributed-pop3-app/sample-configuration/jvm.properties
+4 −1 server/apps/jpa-app/sample-configuration/jvm.properties
+4 −1 server/apps/memory-app/sample-configuration/jvm.properties
+4 −0 server/apps/memory-app/sample-configuration/usersrepository.xml
+21 −0 server/data/data-cassandra/src/test/java/org/apache/james/user/cassandra/CassandraUsersRepositoryTest.java
+21 −0 server/data/data-jpa/src/test/java/org/apache/james/user/jpa/JpaUsersRepositoryTest.java
+19 −4 server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepository.java
+56 −0 server/data/data-ldap/src/test/java/org/apache/james/user/ldap/ReadOnlyUsersLDAPRepositoryTest.java
+24 −5 server/data/data-library/src/main/java/org/apache/james/user/lib/UsersRepositoryImpl.java
+20 −2 server/data/data-library/src/test/java/org/apache/james/user/lib/UsersRepositoryContract.java
+23 −0 server/data/data-memory/src/test/java/org/apache/james/user/memory/MemoryUsersRepositoryTest.java
+4 −0 server/protocols/webadmin/webadmin-core/src/main/java/org/apache/james/webadmin/WebAdminServer.java
+4 −0 src/site/xdoc/server/config-users.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import static org.apache.james.user.ldap.DockerLdapSingleton.ADMIN_PASSWORD;

import java.util.Optional;
import java.util.Set;

import org.apache.commons.configuration2.BaseHierarchicalConfiguration;
import org.apache.commons.configuration2.HierarchicalConfiguration;
Expand Down Expand Up @@ -84,6 +85,11 @@ public UsersRepository testee(Optional<Username> administrator) throws Exception
return getUsersRepository(new CombinedUserDAO(readOnlyLDAPUsersDAO, cassandraUsersDAO), testSystem.getDomainList(), extension.isSupportVirtualHosting(), administrator);
}

@Override
public UsersRepository testee(Set<Username> administrators) throws Exception {
return getUsersRepository(new CombinedUserDAO(readOnlyLDAPUsersDAO, cassandraUsersDAO), testSystem.getDomainList(), extension.isSupportVirtualHosting(), administrators);
}

@Override
public CassandraUsersDAO cassandraUsersDAO() {
return cassandraUsersDAO;
Expand Down Expand Up @@ -127,6 +133,11 @@ public UsersRepository testee(Optional<Username> administrator) throws Exception
return getUsersRepository(new CombinedUserDAO(readOnlyLDAPUsersDAO, cassandraUsersDAO), testSystem.getDomainList(), extension.isSupportVirtualHosting(), administrator);
}

@Override
public UsersRepository testee(Set<Username> administrators) throws Exception {
return getUsersRepository(new CombinedUserDAO(readOnlyLDAPUsersDAO, cassandraUsersDAO), testSystem.getDomainList(), extension.isSupportVirtualHosting(), administrators);
}

@Override
public CassandraUsersDAO cassandraUsersDAO() {
return cassandraUsersDAO;
Expand All @@ -145,6 +156,18 @@ private static CombinedUsersRepository getUsersRepository(CombinedUserDAO combin
return repository;
}

private static CombinedUsersRepository getUsersRepository(CombinedUserDAO combinedUserDAO,
DomainList domainList,
boolean enableVirtualHosting,
Set<Username> administrators) throws Exception {
CombinedUsersRepository repository = new CombinedUsersRepository(domainList, combinedUserDAO);
BaseHierarchicalConfiguration configuration = new BaseHierarchicalConfiguration();
configuration.addProperty("enableVirtualHosting", String.valueOf(enableVirtualHosting));
administrators.forEach(admin -> configuration.addProperty("administratorIds.administratorId", admin.asString()));
repository.configure(configuration);
return repository;
}

static HierarchicalConfiguration<ImmutableNode> ldapRepositoryConfiguration(LdapGenericContainer ldapContainer, boolean enableVirtualHosting) {
PropertyListConfiguration configuration = baseConfiguration(ldapContainer);
if (enableVirtualHosting) {
Expand Down

0 comments on commit 55b23bf

Please sign in to comment.