← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11204: Fixed logical operator bug in import. Caused you to not be able to import anything unless you had...

 

------------------------------------------------------------
revno: 11204
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-06-12 15:21:03 +0200
message:
  Fixed logical operator bug in import. Caused you to not be able to import anything unless you had ALL, or both public and private create auth.
modified:
  dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.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-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java'
--- dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java	2013-05-26 08:02:43 +0000
+++ dhis-2/dhis-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java	2013-06-12 13:21:03 +0000
@@ -390,11 +390,13 @@
      */
     protected boolean newObject( User user, T object )
     {
-        if ( !SharingUtils.canCreatePublic( user, object ) || !SharingUtils.canCreatePrivate( user, object ) )
+        if ( !SharingUtils.canCreatePublic( user, object ) && !SharingUtils.canCreatePrivate( user, object ) )
         {
             summaryType.getImportConflicts().add(
                 new ImportConflict( ImportUtils.getDisplayName( object ), "You do not have create access to class type." ) );
 
+            log.warn( "You do have create access to class type." );
+            
             return false;
         }