fix: [OCISDEV-449] fix user light creation

Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
This commit is contained in:
Julian Koberg
2025-10-28 15:56:16 +01:00
parent e5a2c8e6e5
commit e3a2a148ff
2 changed files with 10 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
Bugfix: Fix user light creation
When trying to switch a user to user light before they logged in for the first time, an error would occur.
The server now correctly handles this case and allows switching to user light even before the first login.
https://github.com/owncloud/ocis/pull/11765

View File

@@ -30,6 +30,10 @@ var (
func DisablePersonalSpace(ctx context.Context, client gateway.GatewayAPIClient, userID string) error { func DisablePersonalSpace(ctx context.Context, client gateway.GatewayAPIClient, userID string) error {
logger := appctx.GetLogger(ctx) logger := appctx.GetLogger(ctx)
sp, err := getPersonalSpace(ctx, client, userID) sp, err := getPersonalSpace(ctx, client, userID)
if err == ErrNotFound {
logger.Debug().Str("userID", userID).Msg("no personal space found to delete")
return nil
}
if err != nil { if err != nil {
return fmt.Errorf("failed to retrieve personal space: %w", err) return fmt.Errorf("failed to retrieve personal space: %w", err)
} }