=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityInstanceController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityInstanceController.java 2014-05-22 12:40:24 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/event/TrackedEntityInstanceController.java 2014-05-23 18:27:45 +0000 @@ -227,7 +227,7 @@ } @RequestMapping( value = "/{id}", method = RequestMethod.GET ) - @PreAuthorize( "hasRole('ALL') or hasRole('F_ACCESS_PATIENT_ATTRIBUTES')" ) + @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_INSTANCE_SEARCH')" ) public String getTrackedEntityInstance( @PathVariable String id, @RequestParam Map parameters, Model model ) throws NotFoundException { @@ -245,7 +245,7 @@ // ------------------------------------------------------------------------- @RequestMapping( value = "", method = RequestMethod.POST, consumes = MediaType.APPLICATION_XML_VALUE ) - @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_ADD')" ) + @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_INSTANCE_ADD')" ) public void postTrackedEntityInstanceXml( HttpServletRequest request, HttpServletResponse response ) throws IOException { @@ -271,7 +271,7 @@ } @RequestMapping( value = "", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE ) - @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_ADD')" ) + @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_INSTANCE_ADD')" ) public void postTrackedEntityInstanceJson( HttpServletRequest request, HttpServletResponse response ) throws IOException { @@ -302,7 +302,7 @@ @RequestMapping( value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_XML_VALUE ) @ResponseStatus( value = HttpStatus.NO_CONTENT ) - @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_ADD')" ) + @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_INSTANCE_ADD')" ) public void updateTrackedEntityInstanceXml( @PathVariable String id, HttpServletRequest request, HttpServletResponse response ) throws IOException { @@ -312,7 +312,7 @@ @RequestMapping( value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE ) @ResponseStatus( value = HttpStatus.NO_CONTENT ) - @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_ADD')" ) + @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_INSTANCE_ADD')" ) public void updateTrackedEntityInstanceJson( @PathVariable String id, HttpServletRequest request, HttpServletResponse response ) throws IOException { @@ -326,7 +326,7 @@ @RequestMapping( value = "/{id}", method = RequestMethod.DELETE ) @ResponseStatus( value = HttpStatus.NO_CONTENT ) - @PreAuthorize( "hasRole('ALL') or hasRole('F_PATIENT_DELETE')" ) + @PreAuthorize( "hasRole('ALL') or hasRole('F_TRACKED_ENTITY_INSTANCE_ADD')" ) public void deleteTrackedEntityInstance( @PathVariable String id ) throws NotFoundException {