dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41555
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21175: minor bug fix to checking user role for program
------------------------------------------------------------
revno: 21175
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-11-23 14:50:52 +0100
message:
minor bug fix to checking user role for program
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.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-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2015-11-20 11:38:58 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2015-11-23 13:50:52 +0000
@@ -538,12 +538,12 @@
}
}
- if( pr == null && !userCredentials.isSuper() && userCredentials.getAllPrograms().size() == 0 )
+ if( pr != null && !userCredentials.isSuper() && userCredentials.getAllPrograms().size() == 0 )
{
throw new IllegalQueryException( "User has no access to programs");
}
- if( pr != null && userCredentials.getAllPrograms().contains( pr ) )
+ if( pr != null && !userCredentials.getAllPrograms().contains( pr ) )
{
throw new IllegalQueryException( "User has no access to program: " + pr.getUid() );
}