dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27276
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13552: Minor
------------------------------------------------------------
revno: 13552
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-01-02 21:58:13 +0100
message:
Minor
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramDeletionHandler.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataApprovalController.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-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramDeletionHandler.java 2013-09-27 11:13:20 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/ProgramDeletionHandler.java 2014-01-02 20:58:13 +0000
@@ -34,6 +34,7 @@
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientIdentifierType;
import org.hisp.dhis.system.deletion.DeletionHandler;
+import org.hisp.dhis.user.UserAuthorityGroup;
import org.hisp.dhis.validation.ValidationCriteria;
/**
@@ -115,4 +116,18 @@
}
}
}
+
+ @Override
+ public void deleteUserAuthorityGroup( UserAuthorityGroup group )
+ {
+ Collection<Program> programs = programService.getAllPrograms();
+
+ for ( Program program : programs )
+ {
+ if ( program.getUserRoles().remove( group ) )
+ {
+ programService.updateProgram( program );
+ }
+ }
+ }
}
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataApprovalController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataApprovalController.java 2013-12-30 16:18:17 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataApprovalController.java 2014-01-02 20:58:13 +0000
@@ -200,7 +200,7 @@
if ( !DataApprovalState.READY_FOR_APPROVAL.equals( state ) )
{
- ContextUtils.conflictResponse( response, "Data is not ready for approval: " + state );
+ ContextUtils.conflictResponse( response, "Data is not ready for approval, current state is: " + state );
return;
}