@RequestMapping(value = "/contacts/{contactId}", method = DELETE) @PreAuthorize("hasPermission(#contactId, 'sample.Contact', 'DELETE')") public void delete(@PathVariable Long contactId) { super.deleteAcl(contactId); contactService.deleteById(contactId); }
@RequestMapping(value = "/contacts/{contactId}/acls/{principalId}", method = DELETE) public void deleteAcl(@PathVariable Long contactId, @PathVariable Long principalId) { super.deleteAcl(contactId, principalId); }
@RequestMapping(value = "/contacts", method = POST) public Long create(@RequestBody ContactDto dto) { Long contactId = contactService.saveContact(dto); super.createAcl(contactId); return contactId; }
@RequestMapping(value = "/contacts/{contactId}/acls", method = PUT) public void createOrUpdateAcls( @PathVariable Long contactId, @RequestBody List<AclEntryDto> aclEntries) { super.createOrUpdateAcls(contactId, aclEntries); }