dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37555
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19182: minor fix
------------------------------------------------------------
revno: 19182
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-05-26 08:50:39 +0700
message:
minor fix
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/acl/AclService.java
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-api/src/main/java/org/hisp/dhis/acl/AclService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/acl/AclService.java 2015-03-16 13:12:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/acl/AclService.java 2015-05-26 01:50:39 +0000
@@ -177,6 +177,14 @@
<T extends IdentifiableObject> boolean canExternalize( User user, Class<T> klass );
/**
+ * Is the default for this type to be private?
+ *
+ * @param klass Type to check
+ * @return Result of test
+ */
+ <T extends IdentifiableObject> boolean defaultPrivate( Class<T> klass );
+
+ /**
* Is the default for this type to be public?
*
* @param klass Type to check
=== 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-05-26 01:45:28 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/acl/DefaultAclService.java 2015-05-26 01:50:39 +0000
@@ -258,10 +258,16 @@
}
@Override
+ public <T extends IdentifiableObject> boolean defaultPrivate( Class<T> klass )
+ {
+ Schema schema = schemaService.getSchema( klass );
+ return schema != null && schema.isDefaultPrivate();
+ }
+
+ @Override
public <T extends IdentifiableObject> boolean defaultPublic( Class<T> klass )
{
- Schema schema = schemaService.getSchema( klass );
- return schema == null || !schema.isDefaultPrivate();
+ return !defaultPrivate( klass );
}
@Override