aboutsummaryrefslogtreecommitdiff
path: root/userapi
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-03-31 10:15:01 +0200
committerGitHub <noreply@github.com>2023-03-31 10:15:01 +0200
commit2854ffeb7d933f76cbdfe0eb6775a8f5699f4170 (patch)
tree67de00500ab6132184239b547fc22e993bc23492 /userapi
parent28d3e296a8adaeea34bca01c7e4e6a0e22918390 (diff)
Add CS API device tests (#3029)
Adds tests for - `/devices` - `/delete_devices` (also adds UIA)
Diffstat (limited to 'userapi')
-rw-r--r--userapi/api/api.go1
-rw-r--r--userapi/internal/user_api.go5
2 files changed, 0 insertions, 6 deletions
diff --git a/userapi/api/api.go b/userapi/api/api.go
index fa297f77..19d48684 100644
--- a/userapi/api/api.go
+++ b/userapi/api/api.go
@@ -224,7 +224,6 @@ type PerformDeviceUpdateRequest struct {
}
type PerformDeviceUpdateResponse struct {
DeviceExists bool
- Forbidden bool
}
type PerformDeviceDeletionRequest struct {
diff --git a/userapi/internal/user_api.go b/userapi/internal/user_api.go
index 8977697b..4049d13b 100644
--- a/userapi/internal/user_api.go
+++ b/userapi/internal/user_api.go
@@ -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")