=== 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 2014-05-22 12:40:24 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/CurrentUserController.java 2014-06-26 15:29:06 +0000 @@ -258,6 +258,15 @@ userService.updateUser( currentUser ); } + @RequestMapping( value = "/authorization", produces = { "application/json", "text/*" } ) + public void getAuthorization( HttpServletResponse response ) throws IOException + { + User currentUser = currentUserService.getCurrentUser(); + + response.setContentType( MediaType.APPLICATION_JSON_VALUE ); + JacksonUtils.toJson( response.getOutputStream(), currentUser.getUserCredentials().getAllAuthorities() ); + } + @RequestMapping( value = "/authorization/{auth}", produces = { "application/json", "text/*" } ) public void hasAuthorization( @PathVariable String auth, HttpServletResponse response ) throws IOException {