fixed method deleting repository admin by email
This commit is contained in:
parent
301e680136
commit
95929e6587
|
@ -282,10 +282,10 @@ public class RepositoryController {
|
|||
/**
|
||||
* Unsubscribe from repo by email
|
||||
*/
|
||||
@RequestMapping(method = RequestMethod.DELETE, path = "{id}/admins/{email}")
|
||||
@RequestMapping(method = RequestMethod.DELETE, path = "{id}/admins/{email:.+}")
|
||||
@PreAuthorize("hasAnyAuthority('ROLE_ADMIN', 'ROLE_PROVIDE_ADMIN') or @authorizationService.isMemberOf(#id)")
|
||||
public Response unsubscribeByEmail(@PathVariable("id") String id, @PathVariable("email") String email) throws ResourceNotFoundException {
|
||||
public ResponseEntity<Void> unsubscribeByEmail(@PathVariable("id") String id, @PathVariable("email") String email) throws ResourceNotFoundException {
|
||||
authorizationService.removeAdmin(id, email);
|
||||
return Response.status(HttpStatus.OK.value()).entity(JsonUtils.createResponse("Role has been removed").toString()).type(javax.ws.rs.core.MediaType.APPLICATION_JSON).build();
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue