dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35669
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18253: Applied patch from TW related to approval logic
------------------------------------------------------------
revno: 18253
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-02-13 11:11:37 +0100
message:
Applied patch from TW related to approval logic
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-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DataApprovalPermissionsEvaluator.java 2015-02-13 10:11:37 +0000
@@ -180,8 +180,11 @@
boolean mayApproveAtNextLevel = ( s == DataApprovalState.ACCEPTED_HERE || ( s == DataApprovalState.APPROVED_HERE && ! acceptanceRequiredForApproval ) )
&& ( ( authorizedToApprove && userLevel == nextApproveDataLevel ) || ( authorizedToApproveAtLowerLevels && userLevel < nextApproveDataLevel ) );
- boolean mayAcceptOrUnacceptAtLevel = authorizedToAcceptAtLowerLevels &&
- ( userLevel == dataLevel - 1 || ( userLevel < dataLevel && authorizedToApproveAtLowerLevels ) );
+ // TODO More testing needed
+
+ // boolean mayAcceptOrUnacceptAtLevel = authorizedToAcceptAtLowerLevels && ( userLevel == dataLevel - 1 || ( userLevel < dataLevel && authorizedToApproveAtLowerLevels ) );
+
+ boolean mayAcceptOrUnacceptAtLevel = authorizedToAcceptAtLowerLevels && ( userLevel <= dataLevel );
boolean mayApprove = ( s.isApprovable() && mayApproveOrUnapproveAtLevel ) || mayApproveAtNextLevel;