=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java 2015-01-23 14:23:04 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java 2015-01-23 14:24:30 +0000 @@ -216,9 +216,9 @@ @RequestMapping( value = "/inbox", produces = { "application/json", "text/*" } ) public void getInbox( HttpServletResponse response ) throws Exception { - User currentUser = currentUserService.getCurrentUser(); + User user = currentUserService.getCurrentUser(); - if ( currentUser == null ) + if ( user == null ) { throw new NotAuthenticatedException(); } @@ -229,12 +229,12 @@ for ( org.hisp.dhis.message.MessageConversation messageConversation : inbox.getMessageConversations() ) { - messageConversation.setAccess( aclService.getAccess( messageConversation ) ); + messageConversation.setAccess( aclService.getAccess( messageConversation, user ) ); } for ( Interpretation interpretation : inbox.getInterpretations() ) { - interpretation.setAccess( aclService.getAccess( interpretation ) ); + interpretation.setAccess( aclService.getAccess( interpretation, user ) ); } response.setContentType( MediaType.APPLICATION_JSON_VALUE ); @@ -244,9 +244,9 @@ @RequestMapping( value = "/inbox/messageConversations", produces = { "application/json", "text/*" } ) public void getInboxMessageConversations( HttpServletResponse response ) throws Exception { - User currentUser = currentUserService.getCurrentUser(); + User user = currentUserService.getCurrentUser(); - if ( currentUser == null ) + if ( user == null ) { throw new NotAuthenticatedException(); } @@ -257,7 +257,7 @@ for ( org.hisp.dhis.message.MessageConversation messageConversation : messageConversations ) { - messageConversation.setAccess( aclService.getAccess( messageConversation ) ); + messageConversation.setAccess( aclService.getAccess( messageConversation, user ) ); } renderService.toJson( response.getOutputStream(), messageConversations ); @@ -266,9 +266,9 @@ @RequestMapping( value = "/inbox/interpretations", produces = { "application/json", "text/*" } ) public void getInboxInterpretations( HttpServletResponse response ) throws Exception { - User currentUser = currentUserService.getCurrentUser(); + User user = currentUserService.getCurrentUser(); - if ( currentUser == null ) + if ( user == null ) { throw new NotAuthenticatedException(); } @@ -278,7 +278,7 @@ for ( Interpretation interpretation : interpretations ) { - interpretation.setAccess( aclService.getAccess( interpretation ) ); + interpretation.setAccess( aclService.getAccess( interpretation, user ) ); } renderService.toJson( response.getOutputStream(), interpretations );