=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AccessStringHelper.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AccessStringHelper.java 2013-08-23 15:56:19 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/AccessStringHelper.java 2014-01-06 19:04:09 +0000 @@ -30,7 +30,7 @@ /** * Currently only the two first positions in the access string are used - rw. - * + * * @author Morten Olav Hansen */ public class AccessStringHelper @@ -83,6 +83,11 @@ return new AccessStringHelper(); } + public static AccessStringHelper newInstance( char[] access ) + { + return new AccessStringHelper( access ); + } + public AccessStringHelper enable( Permission permission ) { access[permission.getPosition()] = permission.getValue(); === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java 2013-12-03 16:18:51 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/interpretation/Interpretation.java 2014-01-06 19:04:09 +0000 @@ -35,6 +35,7 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; import org.hisp.dhis.chart.Chart; +import org.hisp.dhis.common.AccessStringHelper; import org.hisp.dhis.common.BaseIdentifiableObject; import org.hisp.dhis.common.DxfNamespaces; import org.hisp.dhis.common.IdentifiableObject; @@ -144,7 +145,7 @@ { return user; } - + @JsonProperty @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 ) public String getType() @@ -223,8 +224,7 @@ public void updateSharing() { - setPublicAccess( getObject().getPublicAccess() ); - setUserGroupAccesses( new HashSet( getObject().getUserGroupAccesses() ) ); + setPublicAccess( AccessStringHelper.newInstance().enable( AccessStringHelper.Permission.READ ).build() ); } // -------------------------------------------------------------------------