dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35287
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18113: Minor fix
------------------------------------------------------------
revno: 18113
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-01-23 21:24:30 +0700
message:
Minor fix
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== 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 );