dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37922
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19366: proper fix for AclService.canRead, if schema == null or schema.authType.read == null, then return...
------------------------------------------------------------
revno: 19366
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-06-12 01:33:09 +0700
message:
proper fix for AclService.canRead, if schema == null or schema.authType.read == null, then return true
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/acl/DefaultAclService.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/acl/DefaultAclService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/acl/DefaultAclService.java 2015-06-11 08:20:31 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/acl/DefaultAclService.java 2015-06-11 18:33:09 +0000
@@ -217,13 +217,10 @@
@Override
public <T extends IdentifiableObject> boolean canRead( User user, Class<T> klass )
{
- return true;
- /*
Schema schema = schemaService.getSchema( klass );
- return schema != null &&
- (schema.getAuthorityByType( AuthorityType.READ ) == null || canAccess( user, schema.getAuthorityByType( AuthorityType.READ ) ));
- */
+ return schema == null || schema.getAuthorityByType( AuthorityType.READ ) == null
+ || canAccess( user, schema.getAuthorityByType( AuthorityType.READ ) );
}
@Override