Esempio 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);
 }
Esempio n. 2
0
 @RequestMapping(value = "/contacts/{contactId}/acls/{principalId}", method = DELETE)
 public void deleteAcl(@PathVariable Long contactId, @PathVariable Long principalId) {
   super.deleteAcl(contactId, principalId);
 }
Esempio n. 3
0
 @RequestMapping(value = "/contacts", method = POST)
 public Long create(@RequestBody ContactDto dto) {
   Long contactId = contactService.saveContact(dto);
   super.createAcl(contactId);
   return contactId;
 }
Esempio n. 4
0
 @RequestMapping(value = "/contacts/{contactId}/acls", method = PUT)
 public void createOrUpdateAcls(
     @PathVariable Long contactId, @RequestBody List<AclEntryDto> aclEntries) {
   super.createOrUpdateAcls(contactId, aclEntries);
 }