← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10394: add a special read case for UserGroups, this fixes bug for when user changes sharing for an objec...

 

------------------------------------------------------------
revno: 10394
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-03-22 13:46:45 +0700
message:
  add a special read case for UserGroups, this fixes bug for when user changes sharing for an object, but the usergroup is unaccessible for that user
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/SharingUtils.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-api/src/main/java/org/hisp/dhis/common/SharingUtils.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/SharingUtils.java	2013-03-21 14:07:18 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/SharingUtils.java	2013-03-22 06:46:45 +0000
@@ -231,6 +231,7 @@
     public static boolean canRead( User user, IdentifiableObject object )
     {
         if ( sharingOverrideAuthority( user )
+            || UserGroup.class.isAssignableFrom( object.getClass() )
             || object.getUser() == null
             || user.equals( object.getUser() )
             || AccessStringHelper.canRead( object.getPublicAccess() ) )