← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10399: fix sharing publicaccess bug

 

------------------------------------------------------------
revno: 10399
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-03-22 16:55:41 +0700
message:
  fix sharing publicaccess bug
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SharingController.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/api/controller/SharingController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SharingController.java	2013-03-22 09:48:50 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SharingController.java	2013-03-22 09:55:41 +0000
@@ -112,7 +112,7 @@
         sharing.getObject().setId( object.getUid() );
         sharing.getObject().setName( object.getDisplayName() );
 
-        if ( sharing.getObject().getPublicAccess() == null )
+        if ( object.getPublicAccess() == null )
         {
             String access;
 
@@ -151,7 +151,7 @@
         JacksonUtils.toJson( response.getOutputStream(), sharing );
     }
 
-    @RequestMapping( value = "", method = { RequestMethod.POST, RequestMethod.PUT }, consumes = "application/json" )
+    @RequestMapping(value = "", method = { RequestMethod.POST, RequestMethod.PUT }, consumes = "application/json")
     public void setSharing( @RequestParam String type, @RequestParam String id, HttpServletResponse response, HttpServletRequest request ) throws IOException
     {
         BaseIdentifiableObject object = (BaseIdentifiableObject) manager.get( SharingUtils.classForType( type ), id );
@@ -234,7 +234,7 @@
         ContextUtils.okResponse( response, "Access control set" );
     }
 
-    @RequestMapping( value = "/search", produces = { "application/json", "text/*" } )
+    @RequestMapping(value = "/search", produces = { "application/json", "text/*" })
     public void searchUserGroups( @RequestParam String key, HttpServletResponse response ) throws IOException
     {
         SharingUserGroups sharingUserGroups = new SharingUserGroups();