mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 14:06:53 +00:00
Allow device to unlink itself
This commit is contained in:
1 parent
fd10b9723d
commit
7605462d48
2 files changed
+42
-1
No files matched your search
+2
-1
@@ -134,7 +134,8 @@ public class DeviceController {
|
||||
@Path("/{device_id}")
|
||||
@ChangesLinkedDevices
|
||||
public void removeDevice(@Mutable @Auth AuthenticatedDevice auth, @PathParam("device_id") byte deviceId) {
|
||||
if (auth.getAuthenticatedDevice().getId() != Device.PRIMARY_ID) {
|
||||
if (auth.getAuthenticatedDevice().getId() != Device.PRIMARY_ID &&
|
||||
auth.getAuthenticatedDevice().getId() != deviceId) {
|
||||
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user