*/
protected void checkRequiredUserStoreConfiguration() throws UserStoreException {
READ_ONLY = realmConfig.getUserStoreProperty(
UserCoreConstants.RealmConfig.PROPERTY_READ_ONLY);
if (READ_ONLY.equals("true")) {
throw new UserStoreException("This user store manager meant to be read-write, " +
"if you want to use user-store in read-only mode, " +
"please use LDAPUserStoreManager.");
}
//checkGroupConfiguration
READ_LDAP_USER_GROUPS = realmConfig.getUserStoreProperty(LDAPConstants.READ_EXTERNAL_ROLES);
WRITE_LDAP_USER_GROUPS = realmConfig.getUserStoreProperty(
LDAPConstants.WRITE_EXTERNAL_ROLES);
USER_SEARCH_BASE = realmConfig.getUserStoreProperty(LDAPConstants.USER_SEARCH_BASE);
GROUP_SEARCH_BASE = realmConfig.getUserStoreProperty(LDAPConstants.GROUP_SEARCH_BASE);
if ((READ_LDAP_USER_GROUPS == null) || (WRITE_LDAP_USER_GROUPS == null)) {
throw new UserStoreException("Please set the LDAP groups configuration properly.");
}
if ((READ_LDAP_USER_GROUPS.equals("false")) && (WRITE_LDAP_USER_GROUPS.equals("true"))) {
throw new UserStoreException("Wrong combination for LDAP groups " +
"read-write properties.");
}
if ("true".equals(realmConfig.getUserStoreProperty(LDAPConstants.EMPTY_ROLES_ALLOWED))) {
EMPTY_ROLES_ALLOWED = true;