dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12553
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3890: Minor fix
------------------------------------------------------------
revno: 3890
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-06-13 20:34:18 +0200
message:
Minor fix
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserCredentials.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-api/src/main/java/org/hisp/dhis/user/UserCredentials.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserCredentials.java 2011-06-11 19:51:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserCredentials.java 2011-06-13 18:34:18 +0000
@@ -97,14 +97,19 @@
*/
public boolean canIssue( UserAuthorityGroup group )
{
- if ( group == null || userAuthorityGroups.contains( group ) )
+ if ( group == null )
{
return false;
}
-
+
final Set<String> authorities = getAllAuthorities();
- return ( authorities.contains( UserAuthorityGroup.AUTHORITY_ALL ) || authorities.containsAll( group.getAuthorities() ) );
+ if ( authorities.contains( UserAuthorityGroup.AUTHORITY_ALL ) )
+ {
+ return true;
+ }
+
+ return !userAuthorityGroups.contains( group ) && authorities.containsAll( group.getAuthorities() );
}
// -------------------------------------------------------------------------