Allow to hide classification settings in the webapp

This commit is contained in:
Eike Kettner
2020-09-05 16:00:19 +02:00
parent 5ae994e903
commit 1dcccbcf7d
6 changed files with 27 additions and 4 deletions

View File

@ -30,6 +30,13 @@ docspell.server {
# In order to keep this low, a limit can be defined here.
max-note-length = 180
# This defines whether the classification form in the collective
# settings is displayed or not. If all joex instances have document
# classification disabled, it makes sense to hide its settings from
# users.
show-classification-settings = true
# Authentication.
auth {

View File

@ -14,6 +14,7 @@ case class Config(
bind: Config.Bind,
backend: BackendConfig,
auth: Login.Config,
showClassificationSettings: Boolean,
integrationEndpoint: Config.IntegrationEndpoint,
maxItemPageSize: Int,
maxNoteLength: Int,

View File

@ -17,7 +17,8 @@ case class Flags(
integrationEnabled: Boolean,
fullTextSearchEnabled: Boolean,
maxPageSize: Int,
maxNoteLength: Int
maxNoteLength: Int,
showClassificationSettings: Boolean
)
object Flags {
@ -30,7 +31,8 @@ object Flags {
cfg.integrationEndpoint.enabled,
cfg.fullTextSearch.enabled,
cfg.maxItemPageSize,
cfg.maxNoteLength
cfg.maxNoteLength,
cfg.showClassificationSettings
)
implicit val jsonEncoder: Encoder[Flags] =