mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 04:38:04 +01:00
Allow device to unlink itself
This commit is contained in:
committed by
ravi-signal
parent
fd10b9723d
commit
7605462d48
@@ -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