mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
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:
@ -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))
|
||||
|
@ -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_"
|
||||
|
||||
|
Reference in New Issue
Block a user