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