← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18813: Accept approval at any lower level if authorizedToApproveAtLowerLevels

 

------------------------------------------------------------
revno: 18813
committer: jimgrace@xxxxxxxxx
branch nick: dhis2
timestamp: Sun 2015-04-05 22:12:52 -0400
message:
  Accept approval at any lower level if authorizedToApproveAtLowerLevels
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalPermissionsEvaluator.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-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalPermissionsEvaluator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalPermissionsEvaluator.java	2015-03-31 00:55:04 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalPermissionsEvaluator.java	2015-04-06 02:12:52 +0000
@@ -183,7 +183,7 @@
             mayUnapprove = true;
         }
 
-        if ( authorizedToAcceptAtLowerLevels && userLevel == dataLevel - 1 )
+        if ( authorizedToAcceptAtLowerLevels && ( userLevel == dataLevel - 1 || authorizedToApproveAtLowerLevels ) )
         {
             mayAccept =  s.isAcceptable();
             mayUnaccept = s.isUnacceptable();