Add CS API device tests (#3029)

Adds tests for
- `/devices`
- `/delete_devices` (also adds UIA)
This commit is contained in:
Till 2023-03-31 10:15:01 +02:00 committed by GitHub
parent 28d3e296a8
commit 2854ffeb7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 422 additions and 71 deletions

View file

@ -386,11 +386,6 @@ func (a *UserInternalAPI) PerformDeviceUpdate(ctx context.Context, req *api.Perf
}
res.DeviceExists = true
if dev.UserID != req.RequestingUserID {
res.Forbidden = true
return nil
}
err = a.DB.UpdateDevice(ctx, localpart, domain, req.DeviceID, req.DisplayName)
if err != nil {
util.GetLogger(ctx).WithError(err).Error("deviceDB.UpdateDevice failed")