diff --git a/samples/contacts/src/main/webapp/common/WEB-INF/applicationContext-common-authorization.xml b/samples/contacts/src/main/webapp/common/WEB-INF/applicationContext-common-authorization.xml index beaa797367..57c4d3b318 100644 --- a/samples/contacts/src/main/webapp/common/WEB-INF/applicationContext-common-authorization.xml +++ b/samples/contacts/src/main/webapp/common/WEB-INF/applicationContext-common-authorization.xml @@ -34,10 +34,10 @@ sample.contact.Contact - - - - + + + + @@ -47,10 +47,10 @@ sample.contact.Contact - - - - + + + + @@ -60,9 +60,9 @@ sample.contact.Contact - - - + + + @@ -112,10 +112,10 @@ - - - - + + + + @@ -123,10 +123,10 @@ - - - - + + + + @@ -134,28 +134,28 @@ + + The create, getAll, getById etc have ROLE_USER to ensure user is + authenticated (all users hold ROLE_USER in this application). + + The delete and update methods don't need a ROLE_USER as they will + ensure the user is authenticated via their ACL_CONTACT_DELETE or + ACL_CONTACT_READ attribute, which also ensures the user has permission + to the Contact presented as a method argument. + --> - sample.contact.ContactManager.create=ROLE_USER - sample.contact.ContactManager.getAllRecipients=ROLE_USER - sample.contact.ContactManager.getAll=ROLE_USER,AFTER_ACL_COLLECTION_READ - sample.contact.ContactManager.getById=ROLE_USER,AFTER_ACL_READ - sample.contact.ContactManager.delete=ACL_CONTACT_DELETE - sample.contact.ContactManager.deletePermission=ACL_CONTACT_ADMIN - sample.contact.ContactManager.addPermission=ACL_CONTACT_ADMIN + sample.contact.ContactManager.create=ROLE_USER + sample.contact.ContactManager.getAllRecipients=ROLE_USER + sample.contact.ContactManager.getAll=ROLE_USER,AFTER_ACL_COLLECTION_READ + sample.contact.ContactManager.getById=ROLE_USER,AFTER_ACL_READ + sample.contact.ContactManager.delete=ACL_CONTACT_DELETE + sample.contact.ContactManager.deletePermission=ACL_CONTACT_ADMIN + sample.contact.ContactManager.addPermission=ACL_CONTACT_ADMIN