mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 10:28:27 +00:00
Allow a collective to disable the integration endpoint
This commit is contained in:
@ -14,7 +14,7 @@ trait OCollective[F[_]] {
|
||||
|
||||
def find(name: Ident): F[Option[RCollective]]
|
||||
|
||||
def updateLanguage(collective: Ident, lang: Language): F[AddResult]
|
||||
def updateSettings(collective: Ident, lang: OCollective.Settings): F[AddResult]
|
||||
|
||||
def listUser(collective: Ident): F[Vector[RUser]]
|
||||
|
||||
@ -45,6 +45,9 @@ object OCollective {
|
||||
type InsightData = QCollective.InsightData
|
||||
val insightData = QCollective.InsightData
|
||||
|
||||
type Settings = RCollective.Settings
|
||||
val Settings = RCollective.Settings
|
||||
|
||||
sealed trait PassChangeResult
|
||||
object PassChangeResult {
|
||||
case object UserNotFound extends PassChangeResult
|
||||
@ -85,9 +88,9 @@ object OCollective {
|
||||
def find(name: Ident): F[Option[RCollective]] =
|
||||
store.transact(RCollective.findById(name))
|
||||
|
||||
def updateLanguage(collective: Ident, lang: Language): F[AddResult] =
|
||||
def updateSettings(collective: Ident, sett: Settings): F[AddResult] =
|
||||
store
|
||||
.transact(RCollective.updateLanguage(collective, lang))
|
||||
.transact(RCollective.updateSettings(collective, sett))
|
||||
.attempt
|
||||
.map(AddResult.fromUpdate)
|
||||
|
||||
|
@ -88,7 +88,13 @@ object OSignup {
|
||||
for {
|
||||
id2 <- Ident.randomId[F]
|
||||
now <- Timestamp.current[F]
|
||||
c = RCollective(data.collName, CollectiveState.Active, Language.German, now)
|
||||
c = RCollective(
|
||||
data.collName,
|
||||
CollectiveState.Active,
|
||||
Language.German,
|
||||
true,
|
||||
now
|
||||
)
|
||||
u = RUser(
|
||||
id2,
|
||||
data.login,
|
||||
|
Reference in New Issue
Block a user