From 4c529c8ff0cf6be7384aebc56686a598cc8d987e Mon Sep 17 00:00:00 2001 From: Julian Koberg Date: Tue, 20 May 2025 12:00:36 +0200 Subject: [PATCH] feat(frontend): add server managed spaces capability Signed-off-by: Julian Koberg --- .../add-server-managed-spaces-capability.md | 5 +++++ services/frontend/pkg/config/config.go | 2 ++ services/frontend/pkg/revaconfig/config.go | 11 ++++++----- 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 changelog/unreleased/add-server-managed-spaces-capability.md diff --git a/changelog/unreleased/add-server-managed-spaces-capability.md b/changelog/unreleased/add-server-managed-spaces-capability.md new file mode 100644 index 00000000000..0b8baffc6d4 --- /dev/null +++ b/changelog/unreleased/add-server-managed-spaces-capability.md @@ -0,0 +1,5 @@ +Enhancement: Add capability for server managed spaces + +Adds the capability for server managed spaces, which will deactivate adding/removing users to/from spaces in the web UI. + +https://github.com/owncloud/ocis/pull/11332 diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index ad8e151fbe9..2d0e9982b4d 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -61,6 +61,8 @@ type Config struct { ConfigurableNotifications bool `yaml:"configurable_notifications" env:"FRONTEND_CONFIGURABLE_NOTIFICATIONS" desc:"Allow configuring notifications via web client." introductionVersion:"7.1"` + ServerManagedSpaces bool `yaml:"server_managed_spaces" env:"OCIS_CLAIM_MANAGED_SPACES_ENABLED" desc:"Block adding/removing users to spaces through the webUI." introductionVersion:"%%NEXT_PRODUCTION_VERSION%%"` + Context context.Context `yaml:"-"` } diff --git a/services/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index 44b3fa8e6ff..0e002605bfe 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -294,11 +294,12 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string }, }, "spaces": map[string]interface{}{ - "version": "1.0.0", - "enabled": true, - "projects": true, - "share_jail": true, - "max_quota": cfg.MaxQuota, + "version": "1.0.0", + "enabled": true, + "projects": true, + "share_jail": true, + "max_quota": cfg.MaxQuota, + "server_managed": cfg.ServerManagedSpaces, }, "theme": capabilities.Default().Theme, "search": map[string]interface{}{