Skip to content

Commit 94d92a7

Browse files
authored
Merge pull request #11765 from kobergj/FixUserLightCreation
[OCISDEV-449] Fix user light creation
2 parents e5a2c8e + e3a2a14 commit 94d92a7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Fix user light creation
2+
3+
When trying to switch a user to user light before they logged in for the first time, an error would occur.
4+
The server now correctly handles this case and allows switching to user light even before the first login.
5+
6+
https://github.com/owncloud/ocis/pull/11765

ocis-pkg/shared/storage_utils.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ var (
3030
func DisablePersonalSpace(ctx context.Context, client gateway.GatewayAPIClient, userID string) error {
3131
logger := appctx.GetLogger(ctx)
3232
sp, err := getPersonalSpace(ctx, client, userID)
33+
if err == ErrNotFound {
34+
logger.Debug().Str("userID", userID).Msg("no personal space found to delete")
35+
return nil
36+
}
3337
if err != nil {
3438
return fmt.Errorf("failed to retrieve personal space: %w", err)
3539
}

0 commit comments

Comments
 (0)