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