dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31350
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15961: Minor
------------------------------------------------------------
revno: 15961
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-07-03 15:13:37 +0200
message:
Minor
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.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-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java 2014-07-03 13:09:09 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java 2014-07-03 13:13:37 +0000
@@ -286,9 +286,7 @@
if ( aclService.isSupported( getEntityClass() ) )
{
- User user = currentUserService.getCurrentUser();
-
- addAccessProperties( entities, user );
+ addAccessProperties( entities );
}
for ( T entity : entities )
@@ -557,8 +555,10 @@
return schemaService.getDynamicSchema( getEntityClass() );
}
- protected void addAccessProperties( List<T> objects, User user )
+ protected void addAccessProperties( List<T> objects )
{
+ User user = currentUserService.getCurrentUser();
+
for ( T object : objects )
{
Access access = new Access();
@@ -582,9 +582,7 @@
if ( entityList != null && aclService.isSupported( getEntityClass() ) )
{
- User user = currentUserService.getCurrentUser();
-
- addAccessProperties( entityList, user );
+ addAccessProperties( entityList );
}
}