Register external accounts

This creates the account if it doesn't exist yet; otherwise it's a
noop. Only valid for non-local accounts.
This commit is contained in:
eikek
2021-09-05 19:11:42 +02:00
parent aa099a340e
commit 7edb96a297
4 changed files with 87 additions and 28 deletions

View File

@ -37,6 +37,9 @@ object RCollective {
val all = NonEmptyList.of[Column[_]](id, state, language, integration, created)
}
def makeDefault(collName: Ident, created: Timestamp): RCollective =
RCollective(collName, CollectiveState.Active, Language.German, true, created)
val T = Table(None)
def as(alias: String): Table =
Table(Some(alias))

View File

@ -29,6 +29,28 @@ case class RUser(
) {}
object RUser {
def makeDefault(
id: Ident,
login: Ident,
collName: Ident,
password: Password,
source: AccountSource,
created: Timestamp
): RUser =
RUser(
id,
login,
collName,
password,
UserState.Active,
source,
None,
0,
None,
created
)
final case class Table(alias: Option[String]) extends TableDef {
val tableName = "user_"