Use JSONB column to store email addresses

Former-commit-id: 98d01b978f
embedded-to-json
Jens Pelzetter 2020-05-23 19:22:34 +02:00
parent 047aaf0645
commit 87172c1f27
25 changed files with 231 additions and 359 deletions

View File

@ -18,11 +18,6 @@
*/
package org.libreccm.core;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@ -32,38 +27,38 @@ import java.util.Objects;
import static org.libreccm.core.CoreConstants.CORE_XML_NS;
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonObjectBuilder;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
/**
* An embeddable entity for storing email addresses.
*
* In contrast to its predecessor {@code com.arsdigita.kernel.EmailAddress}
* this class does not provide verification methods. Verification is done using
* the <em>Bean Validiation API</em> (Hibernate Validator is used as
* In contrast to its predecessor {@code com.arsdigita.kernel.EmailAddress} this
* class does not provide verification methods. Verification is done using the
* <em>Bean Validiation API</em> (Hibernate Validator is used as
* implementation).
*
* Because this class is an embeddable JPA entity it can be used in other
* entities to store eMail addresses.
* This class is inteded to maps a JSONB column using the
* {@link EmailAddressType}, or if a list of email addresses should be stored,
* the {@link EmailAddressListType}.
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
@Embeddable
@XmlRootElement(name = "email-address", namespace = CORE_XML_NS)
public class EmailAddress implements Serializable {
private static final long serialVersionUID = -4076089589412432766L;
@Column(name = "EMAIL_ADDRESS", length = 512, nullable = false)
@XmlElement(name = "address", namespace = CORE_XML_NS, required = true)
@NotBlank
@Email
private String address;
@Column(name = "BOUNCING")
@XmlElement(name = "bouncing", namespace = CORE_XML_NS)
private boolean bouncing;
@Column(name = "VERIFIED")
@XmlElement(name = "verified", namespace = CORE_XML_NS)
private boolean verified;
@ -126,6 +121,14 @@ public class EmailAddress implements Serializable {
return obj instanceof EmailAddress;
}
public static EmailAddress fromJson(final JsonObject jsonObject) {
final EmailAddress address = new EmailAddress();
address.setAddress(jsonObject.getString("address"));
address.setBouncing(jsonObject.getBoolean("bouncing"));
address.setVerified(jsonObject.getBoolean("verified"));
return address;
}
public JsonObjectBuilder buildJson() {
return Json
.createObjectBuilder()
@ -134,6 +137,10 @@ public class EmailAddress implements Serializable {
.add("verified", verified);
}
public JsonObject toJson() {
return buildJson().build();
}
@Override
public String toString() {
return String.format("%s{ "

View File

@ -0,0 +1,62 @@
/*
* Copyright (C) 2020 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package org.libreccm.core;
import org.libreccm.hibernate.AbstractCcmJsonUserType;
import java.util.List;
import java.util.stream.Collectors;
import javax.json.Json;
import javax.json.JsonArrayBuilder;
import javax.json.JsonReader;
import javax.json.JsonValue;
import javax.json.JsonWriter;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class EmailAddressListType extends AbstractCcmJsonUserType {
@Override
protected Object nullSafeGet(final JsonReader jsonReader) {
return jsonReader
.readArray()
.stream()
.map(JsonValue::asJsonObject)
.map(EmailAddress::fromJson)
.collect(Collectors.toList());
}
@Override
protected void nullSafeSet(
final Object value, final JsonWriter jsonWriter
) {
@SuppressWarnings("unchecked")
final List<EmailAddress> addresses = (List<EmailAddress>) value;
final JsonArrayBuilder jsonArrayBuilder = Json.createArrayBuilder();
addresses
.stream()
.map(EmailAddress::buildJson)
.forEach(jsonArrayBuilder::add);
jsonWriter.writeArray(jsonArrayBuilder.build());
}
}

View File

@ -0,0 +1,45 @@
/*
* Copyright (C) 2020 LibreCCM Foundation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
package org.libreccm.core;
import org.libreccm.hibernate.AbstractCcmJsonUserType;
import javax.json.JsonReader;
import javax.json.JsonWriter;
/**
* Hibernate User type mapping instances of {@link EmailAddress} to a JSON.
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
public class EmailAddressType extends AbstractCcmJsonUserType {
@Override
protected Object nullSafeGet(final JsonReader jsonReader) {
return EmailAddress.fromJson(jsonReader.readObject());
}
@Override
protected void nullSafeSet(
final Object value, final JsonWriter jsonWriter
) {
jsonWriter.writeObject(((EmailAddress) value).toJson());
}
}

View File

@ -18,27 +18,8 @@
*/
package org.libreccm.l10n;
import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.usertype.UserType;
import org.libreccm.hibernate.AbstractCcmJsonUserType;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.io.StringReader;
import java.io.StringWriter;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.Objects;
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonReader;
import javax.json.JsonWriter;
@ -60,114 +41,5 @@ public class LocalizedStringType extends AbstractCcmJsonUserType {
) {
jsonWriter.writeObject(((LocalizedString) value).toJson());
}
//implements UserType {
// @Override
// public int[] sqlTypes() {
// return new int[]{Types.JAVA_OBJECT};
// }
//
// @Override
// public Class<LocalizedString> returnedClass() {
// return LocalizedString.class;
// }
//
// @Override
// public boolean equals(final Object obj1, final Object obj2)
// throws HibernateException {
// return Objects.equals(obj1, obj2);
// }
//
// @Override
// public int hashCode(final Object obj) throws HibernateException {
// return Objects.hashCode(obj);
// }
//
// @Override
// public Object nullSafeGet(
// final ResultSet resultSet,
// final String[] names,
// final SharedSessionContractImplementor session,
// final Object owner
// ) throws HibernateException, SQLException {
// final String cellContent = resultSet.getString(names[0]);
// if (cellContent == null) {
// return null;
// } else {
// try (StringReader strReader = new StringReader(cellContent);
// JsonReader jsonReader = Json.createReader(strReader)) {
// return LocalizedString.fromJson(jsonReader.readObject());
// }
// }
// }
//
// @Override
// public void nullSafeSet(
// final PreparedStatement statement,
// final Object value,
// final int index,
// final SharedSessionContractImplementor session
// ) throws HibernateException, SQLException {
// if (value == null) {
// statement.setObject(index, null, Types.OTHER);
// } else {
// final JsonObject jsonObject = ((LocalizedString) value).toJson();
// try (StringWriter strWriter = new StringWriter();
// JsonWriter jsonWriter = Json.createWriter(strWriter)) {
// jsonWriter.writeObject(jsonObject);
// statement.setObject(index, strWriter.toString(), Types.OTHER);
// } catch (IOException ex) {
// throw new HibernateException(ex);
// }
// }
// }
//
// @Override
// public Object deepCopy(final Object value) throws HibernateException {
// final byte[] serialized;
// try (ByteArrayOutputStream bos = new ByteArrayOutputStream();
// ObjectOutputStream oos = new ObjectOutputStream(bos)) {
// oos.writeObject(value);
// oos.flush();
// serialized = bos.toByteArray();
// } catch (IOException ex) {
// throw new HibernateException(ex);
// }
//
// final Object obj;
// try (ByteArrayInputStream bais = new ByteArrayInputStream(serialized);
// ObjectInputStream ois = new ObjectInputStream(bais)) {
// obj = ois.readObject();
// } catch (IOException | ClassNotFoundException ex) {
// throw new HibernateException(ex);
// }
// return obj;
// }
//
// @Override
// public boolean isMutable() {
// return true;
// }
//
// @Override
// public Serializable disassemble(final Object value)
// throws HibernateException {
// return (Serializable) deepCopy(value);
// }
//
// @Override
// public Object assemble(final Serializable cached, final Object owner) throws
// HibernateException {
// throw new UnsupportedOperationException("Not supported yet.");
// }
//
// @Override
// public Object replace(
// final Object original,
// final Object target,
// final Object owner
// ) throws HibernateException {
// return deepCopy(original);
// }
}

View File

@ -30,6 +30,7 @@ import java.io.Serializable;
import static org.libreccm.core.CoreConstants.CORE_XML_NS;
import static org.libreccm.core.CoreConstants.DB_SCHEMA;
import org.hibernate.annotations.Type;
import org.libreccm.core.api.JsonArrayCollector;
import org.libreccm.imexport.Exportable;
@ -43,15 +44,9 @@ import java.util.Set;
import javax.json.Json;
import javax.json.JsonArrayBuilder;
import javax.json.JsonObjectBuilder;
import javax.persistence.AssociationOverride;
import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.NamedAttributeNode;
import javax.persistence.NamedEntityGraph;
import javax.persistence.NamedEntityGraphs;
@ -86,16 +81,16 @@ import javax.xml.bind.annotation.XmlTransient;
+ " u.primaryEmailAddress.address"),
@NamedQuery(name = "User.countByName",
query = "SELECT COUNT(u) FROM User u WHERE u.name = :name"),
@NamedQuery(name = "User.findByEmailAddress",
query = "SELECT u FROM User u WHERE "
+ "u.primaryEmailAddress.address = :emailAddress "
+ "ORDER BY u.name, "
+ " u.familyName, "
+ " u.givenName, "
+ " u.primaryEmailAddress.address"),
@NamedQuery(name = "User.countByPrimaryEmailAddress",
query = "SELECT COUNT(u) FROM User u "
+ "WHERE u.primaryEmailAddress.address = :emailAddress"),
// @NamedQuery(name = "User.findByEmailAddress",
// query = "SELECT u FROM User u WHERE "
// + "u.primaryEmailAddress.address = :emailAddress "
// + "ORDER BY u.name, "
// + " u.familyName, "
// + " u.givenName, "
// + " u.primaryEmailAddress.address"),
// @NamedQuery(name = "User.countByPrimaryEmailAddress",
// query = "SELECT COUNT(u) FROM User u "
// + "WHERE u.primaryEmailAddress.address = :emailAddress"),
@NamedQuery(
name = "User.filterByNameAndEmail",
query = "SELECT u FROM User u WHERE "
@ -107,12 +102,12 @@ import javax.xml.bind.annotation.XmlTransient;
+ "u.familyName, "
+ "u.givenName, "
+ "u.primaryEmailAddress.address"),
@NamedQuery(
name = "User.findAllOrderedByUsername",
query = "SELECT u FROM User u ORDER BY u.name, "
+ " u.familyName, "
+ " u.givenName, "
+ " u.primaryEmailAddress.address"),
// @NamedQuery(
// name = "User.findAllOrderedByUsername",
// query = "SELECT u FROM User u ORDER BY u.name, "
// + " u.familyName, "
// + " u.givenName, "
// + " u.primaryEmailAddress.address"),
@NamedQuery(name = "User.findByGroup",
query = "SELECT u FROM User u "
+ "JOIN u.groupMemberships m "
@ -170,14 +165,8 @@ public class User extends Party implements Serializable, Exportable {
/**
* The primary email address of the user.
*/
@Embedded
@AssociationOverride(
name = "USER_PRIMARY_EMAIL_ADDRESSES",
joinTable = @JoinTable(name = "USER_PRIMARY_EMAIL_ADDRESSES",
schema = DB_SCHEMA,
joinColumns = {
@JoinColumn(name = "USER_ID")
}))
@Column(name = "PRIMARY_EMAIL_ADDRESS")
@Type(type = "org.libreccm.core.EmailAddressType")
@NotNull
@XmlElement(name = "primary-email-address", namespace = CORE_XML_NS)
private EmailAddress primaryEmailAddress;
@ -185,11 +174,8 @@ public class User extends Party implements Serializable, Exportable {
/**
* Additional email addresses of the user.
*/
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "USER_EMAIL_ADDRESSES",
schema = DB_SCHEMA,
joinColumns = {
@JoinColumn(name = "USER_ID")})
@Column(name = "EMAIL_ADDRESSES")
@Type(type = "org.libreccm.core.EmailAddressListType")
@XmlElementWrapper(name = "email-addresses", namespace = CORE_XML_NS)
@XmlElement(name = "email-address", namespace = CORE_XML_NS)
private List<EmailAddress> emailAddresses;

View File

@ -0,0 +1,12 @@
ALTER TABLE ccm_core.users ADD COLUMN primary_email_address JSONB NOT NULL;
ALTER TABLE ccm_core.users ADD COLUMN email_addresses JSONB;
UPDATE ccm_core.users
SET primary_email_address = JSONB_BUILD_OBJECT(
'address', email_address,
'bouncing', bouncing,
'verified', verified
);
DROP TABLE ccm_core.user_email_addresses;
ALTER TABLE ccm_core.users DROP COLUMN email_address;
ALTER TABLE ccm_core.users DROP COLUMN bouncing;
ALTER TABLE ccm_core.users DROP COLUMN verified;

View File

@ -1,3 +1,4 @@
create table CCM_CORE.APPLICATIONS (
APPLICATION_TYPE varchar(1024) not null,
PRIMARY_URL varchar(1024) not null,
@ -446,12 +447,12 @@
SETTING_ID int8 not null,
CONFIGURATION_CLASS varchar(512) not null,
NAME varchar(512) not null,
SETTING_VALUE_LONG int8,
SETTING_VALUE_LOCALIZED_STRING jsonb,
SETTING_VALUE_BOOLEAN boolean,
SETTING_VALUE_DOUBLE float8,
SETTING_VALUE_LONG int8,
SETTING_VALUE_STRING varchar(1024),
SETTING_VALUE_BIG_DECIMAL numeric(19, 2),
SETTING_VALUE_BOOLEAN boolean,
SETTING_VALUE_LOCALIZED_STRING jsonb,
primary key (SETTING_ID)
);
@ -558,22 +559,14 @@
primary key (OBJECT_ID)
);
create table CCM_CORE.USER_EMAIL_ADDRESSES (
USER_ID int8 not null,
EMAIL_ADDRESS varchar(512) not null,
BOUNCING boolean,
VERIFIED boolean
);
create table CCM_CORE.USERS (
BANNED boolean,
EMAIL_ADDRESSES jsonb,
FAMILY_NAME varchar(512),
GIVEN_NAME varchar(512),
PASSWORD varchar(2048),
PASSWORD_RESET_REQUIRED boolean,
EMAIL_ADDRESS varchar(512) not null,
BOUNCING boolean,
VERIFIED boolean,
PRIMARY_EMAIL_ADDRESS jsonb,
PARTY_ID int8 not null,
primary key (PARTY_ID)
);
@ -1110,11 +1103,6 @@ create sequence hibernate_sequence start 1 increment 1;
foreign key (OBJECT_ID)
references CCM_CORE.CCM_OBJECTS;
alter table CCM_CORE.USER_EMAIL_ADDRESSES
add constraint FKr900l79erul95seyyccf04ufc
foreign key (USER_ID)
references CCM_CORE.USERS;
alter table CCM_CORE.USERS
add constraint FKosh928q71aonu6l1kurb417r
foreign key (PARTY_ID)

View File

@ -26,8 +26,6 @@ DELETE FROM ccm_core.one_time_auth_tokens;
DELETE FROM ccm_core.users;
DELETE FROM ccm_core.user_email_addresses;
DELETE FROM ccm_core.parties;
DELETE FROM ccm_core.ccm_roles;

View File

@ -26,36 +26,30 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 20
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{ \"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Public
given_name: Joe
party_id: 30
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
ccm_core.groups:
# admins
- party_id: 40

View File

@ -26,36 +26,30 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 20
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{ \"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Public
given_name: Joe
party_id: 30
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
ccm_core.groups:
# admins
- party_id: 40

View File

@ -26,36 +26,30 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 20
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{ \"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Public
given_name: Joe
party_id: 30
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
ccm_core.groups:
# admins
- party_id: 40

View File

@ -11,12 +11,10 @@ ccm_core.groups:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true

View File

@ -18,23 +18,19 @@ ccm_core.groups:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 30
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true

View File

@ -11,12 +11,10 @@ ccm_core.groups:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true

View File

@ -26,36 +26,30 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 20
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{\"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}}"
family_name: Public
given_name: Joe
party_id: 30
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
ccm_core.groups:
# group1
- party_id: 100

View File

@ -26,36 +26,30 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 20
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{\"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}}"
family_name: Public
given_name: Joe
party_id: 30
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
ccm_core.groups:
# group1
- party_id: 100

View File

@ -26,36 +26,30 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 20
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{\"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}}"
family_name: Public
given_name: Joe
party_id: 30
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
ccm_core.groups:
# group1
- party_id: 100

View File

@ -26,55 +26,45 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 41001
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 41002
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{\"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}}"
family_name: Public
given_name: Joe
party_id: 41003
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
# Public user
- banned: false
bouncing: false
email_address: public-user@example.org
primary_email_address: "{\"address\": \"public-user@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: user
given_name: public
party_id: 41004
password_reset_required: false
verified: true
# Erik Mustermann (banned)
- banned: true
bouncing: false
email_address: erik.mustermann@example.org
primary_email_address: "{\"address\": \"erik.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Musterman
given_name: Erik
party_id: 41005
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
ccm_core.groups:
- party_id: 42001
- party_id: 42002

View File

@ -19,42 +19,34 @@ ccm_core.users:
# John Doe
- party_id: 10
banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- party_id: 20
banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- party_id: 30
banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{\"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}}"
family_name: Public
given_name: Joe
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
# Jane Doe
- party_id: 40
banned: false
bouncing: false
email_address: jane.doe@example.org
primary_email_address: "{\"address\": \"jane.doe@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: Jane
password: $shiro1$SHA-512$500000$24lA090z7GKYr4VFlZ6t4A==$/heoTHPA5huT1UfJ8Q+waXEG6AjUKhFYLFrj7KW/l0/z9O+QkiZTtfPfbcPblgjcEvrROMEIoQY4Z65S7rFLQg==
password_reset_required: false
verified: true

View File

@ -14,36 +14,30 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 20
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{\"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}}"
family_name: Public
given_name: Joe
party_id: 30
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
ccm_core.ccm_objects:
- object_id: 100
display_name: registry

View File

@ -10,22 +10,18 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{\"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}}"
family_name: Public
given_name: Joe
party_id: 30
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true

View File

@ -14,33 +14,27 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: jd@example.com
primary_email_address: "{\"address\": \"jd@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo1456
password: $shiro1$SHA-512$500000$AH1llRaMHE8W31Q7VG6jsA==$XXgKeyDCsrN23NvszQ5wt+uViQUlVqTAM+05LrE7Bd9sc0eaJT8HlAGvSdY+rqTLbiGm9YS4pohzoUt1x3kmKg==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{\"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}}"
family_name: Public
given_name: Joe
party_id: 30
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 20
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true

View File

@ -19,42 +19,34 @@ ccm_core.users:
# John Doe
- party_id: 10
banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- party_id: 20
banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- party_id: 30
banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{\"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}}"
family_name: Public
given_name: Joe
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true
# Jane Doe
- party_id: 40
banned: false
bouncing: false
email_address: jane.doe@example.org
primary_email_address: "{\"address\": \"jane.doe@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: Jane
password: $shiro1$SHA-512$500000$24lA090z7GKYr4VFlZ6t4A==$/heoTHPA5huT1UfJ8Q+waXEG6AjUKhFYLFrj7KW/l0/z9O+QkiZTtfPfbcPblgjcEvrROMEIoQY4Z65S7rFLQg==
password_reset_required: false
verified: false

View File

@ -14,33 +14,27 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 20
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Public
given_name: Joe
party_id: 30
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true

View File

@ -14,33 +14,27 @@ ccm_core.parties:
ccm_core.users:
# John Doe
- banned: false
bouncing: false
email_address: john.doe@example.com
primary_email_address: "{\"address\": \"john.doe@example.com\", \"bouncing\": false, \"verified\": true}"
family_name: Doe
given_name: John
party_id: 10
# foo123
password: $shiro1$SHA-512$500000$7xkDcZUN0/whJInHIvGsDw==$WhelBVmJU/cLV7lAkMOrE5B/mqCW0bUuid1WX+xBwzzAaekC5bYn9eeOFGJWhiDgmaC50ZCUmM96/iGsRoc4uA==
password_reset_required: false
verified: true
# Max Mustermann
- banned: false
bouncing: false
email_address: max.mustermann@example.org
primary_email_address: "{\"address\": \"max.mustermann@example.org\", \"bouncing\": false, \"verified\": true}"
family_name: Mustermann
given_name: Max
party_id: 20
# foo123
password: $shiro1$SHA-512$500000$Y7CnccN1h25sR7KCElMOXg==$CVLWBhetodaEzzhDfGjRcCFZtSW02xOnjH7xhBx0lbxO66grKIt6LWmXoUhLEydce1JZ7cbzNLYOxIwwTeqi5Q==
password_reset_required: false
verified: true
# Joe Public
- banned: false
bouncing: false
email_address: joe.public@example.com
primary_email_address: "{\"address\": \"joe.public@example.com\", \"bouncing\": false, \"verified\": true}}"
family_name: Public
given_name: Joe
party_id: 30
password: $shiro1$SHA-512$500000$RUCYXAQt+XzUmj3x8oG5gw==$qU+lX160Jc6sNUOI9X85wlf2lzn4/hLJNURtjmw9LOYJ7vAqUFFmhyNCMxpzuHIpzeMELr+A0XReoSmtcZnOOw==
password_reset_required: false
verified: true