dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20257
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9175: Authorities
------------------------------------------------------------
revno: 9175
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-12-04 19:31:02 +0100
message:
Authorities
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ResourceTableController.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/api/controller/ResourceTableController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ResourceTableController.java 2012-12-04 18:16:30 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ResourceTableController.java 2012-12-04 18:31:02 +0000
@@ -33,6 +33,7 @@
import org.hisp.dhis.api.utils.ContextUtils;
import org.hisp.dhis.resourcetable.ResourceTableService;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -53,6 +54,7 @@
private ResourceTableService resourceTableService;
@RequestMapping( value = "/analytics", method = RequestMethod.PUT )
+ @PreAuthorize( "hasRole('ALL') or hasRole('F_DATA_MART_ADMIN')" )
public void analytics( HttpServletResponse response )
{
analyticsTableService.update();
@@ -61,6 +63,7 @@
}
@RequestMapping( method = RequestMethod.PUT )
+ @PreAuthorize( "hasRole('ALL') or hasRole('F_PERFORM_MAINTENANCE')" )
public void resourceTables( HttpServletResponse response )
{
resourceTableService.generateCategoryOptionComboNames();