[server] Fix another validation issue (#1514)
## Description ## Tests Tested file create and file update locally
This commit is contained in:
commit
ba2ca95c5b
1 changed files with 4 additions and 3 deletions
|
@ -90,10 +90,11 @@ func (c *FileController) validateFileCreateOrUpdateReq(userID int64, file ente.F
|
|||
if collection.IsDeleted {
|
||||
return stacktrace.Propagate(ente.ErrNotFound, "collection has been deleted")
|
||||
}
|
||||
if file.OwnerID != userID {
|
||||
return stacktrace.Propagate(ente.ErrPermissionDenied, "file ownerID doesn't match with userID")
|
||||
}
|
||||
}
|
||||
if file.OwnerID != userID {
|
||||
return stacktrace.Propagate(ente.ErrPermissionDenied, "file ownerID doesn't match with userID")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue