dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25199
[Merge] lp:~sis-ma/dhis2/SISMA-475 into lp:dhis2
Leandro Soares has proposed merging lp:~sis-ma/dhis2/SISMA-475 into lp:dhis2.
Requested reviews:
DHIS 2 core developers (dhis2-devs-core)
For more details, see:
https://code.launchpad.net/~sis-ma/dhis2/SISMA-475/+merge/189307
--
https://code.launchpad.net/~sis-ma/dhis2/SISMA-475/+merge/189307
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java 2013-09-11 15:26:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserAuthorityGroup.java 2013-10-04 13:18:01 +0000
@@ -161,7 +161,7 @@
description = userAuthorityGroup.getDescription() == null ? description : userAuthorityGroup.getDescription();
removeAllAuthorities();
- authorities.addAll( authorities );
+ authorities.addAll( ((UserAuthorityGroup) other).getAuthorities() );
removeAllDataSets();
dataSets.addAll( userAuthorityGroup.getDataSets() );
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java 2013-09-11 15:26:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserGroup.java 2013-10-04 13:18:01 +0000
@@ -39,6 +39,7 @@
import org.hisp.dhis.common.BaseIdentifiableObject;
import org.hisp.dhis.common.DxfNamespaces;
import org.hisp.dhis.common.IdentifiableObject;
+import org.hisp.dhis.common.annotation.Scanned;
import org.hisp.dhis.common.view.DetailedView;
import org.hisp.dhis.common.view.ExportView;
@@ -57,6 +58,7 @@
/**
* Set of related users
*/
+ @Scanned
private Set<User> members = new HashSet<User>();
/**
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java 2013-10-01 09:34:05 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/ExchangeClasses.java 2013-10-04 13:18:01 +0000
@@ -172,10 +172,6 @@
exportClasses = new LinkedHashMap<Class<? extends IdentifiableObject>, String>( allExportClasses );
importClasses = new LinkedHashMap<Class<? extends IdentifiableObject>, String>( allExportClasses );
- // for now, do not allow user/userGroup to be imported
- //importClasses.remove( User.class );
- importClasses.remove( UserGroup.class );
-
// this is considered data, and is not available for meta-data export/import
exportClasses.remove( MessageConversation.class );
exportClasses.remove( Interpretation.class );
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java 2013-10-01 12:52:30 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java 2013-10-04 13:18:01 +0000
@@ -476,14 +476,6 @@
*/
protected boolean updateObject( User user, T object, T persistedObject )
{
- if ( newOnly( object ) )
- {
- summaryType.getImportConflicts().add(
- new ImportConflict( ImportUtils.getDisplayName( object ), "This object type only allows creation of new objects." ) );
-
- return false;
- }
-
if ( !SharingUtils.canUpdate( user, persistedObject ) )
{
summaryType.getImportConflicts().add(
@@ -608,13 +600,6 @@
//-------------------------------------------------------------------------------------------------------
// Helpers
//-------------------------------------------------------------------------------------------------------
-
- // until we have proper update of UserGroup/UserAuthorityGroup, only allow new instances to be created
- private boolean newOnly( T object )
- {
- return UserGroup.class.isInstance( object ) || UserAuthorityGroup.class.isInstance( object );
- }
-
private void importObjectLocal( User user, T object )
{
if ( validateIdentifiableObject( object ) )
Follow ups