🐛 Fix deleting a user also deleting his shares

This commit is contained in:
Andreas Schneider 2020-11-01 12:07:37 +01:00
parent 82fe41b14d
commit 756f6c5f29
1 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ func (cmd CmdUserDelete) Run(app *app) error {
}
allSuccessful := true
for _, userShare := range sharesByUser {
if err := app.shareStore.RemoveShare(userShare.UUID); err != nil {
if err := app.shareStore.RemoveUserFromShare(userShare.Share, cmd.Username); err != nil {
fmt.Fprintf(os.Stderr, "User %q cannot be removed from Share %q: %v\n", cmd.Username, userShare.UUID.String(), err)
allSuccessful = false
}