dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27653
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13766: Minor change to modules response
------------------------------------------------------------
revno: 13766
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-01-17 12:42:28 +0100
message:
Minor change to modules response
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonModules.vm
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/LogicalOrAccessDecisionManager.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/Module.java
dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml
--
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-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonModules.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonModules.vm 2014-01-09 10:26:40 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonModules.vm 2014-01-17 11:42:28 +0000
@@ -5,7 +5,7 @@
"name":"$!encoder.jsonEncode( $module.name )",
"namespace":"$!encoder.jsonEncode( $module.namespace )",
"defaultAction":"$!encoder.jsonEncode( $module.defaultAction )",
-"icon":"$!encoder.jsonEncode( $module.icon )",
+"icon":"$!encoder.jsonEncode( $module.iconFallback )",
"description":"$!encoder.jsonEncode( $module.description )"
}#if( $velocityCount < $size ),#end
#end
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/LogicalOrAccessDecisionManager.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/LogicalOrAccessDecisionManager.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/vote/LogicalOrAccessDecisionManager.java 2014-01-17 11:42:28 +0000
@@ -75,8 +75,8 @@
for ( AccessDecisionManager accessDecisionManager : accessDecisionManagers )
{
- // we can't assume that all decision managers can support the same type, so we need to check for
- // every request.
+ // Cannot assume that all decision managers can support the same type
+
if ( accessDecisionManager.supports( object.getClass() ) )
{
try
@@ -86,10 +86,12 @@
LOG.debug( "ACCESS GRANTED [" + object.toString() + "]" );
return;
- } catch ( AccessDeniedException e )
+ }
+ catch ( AccessDeniedException e )
{
ade = e;
- } catch ( InsufficientAuthenticationException e )
+ }
+ catch ( InsufficientAuthenticationException e )
{
iae = e;
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/Module.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/Module.java 2013-11-01 11:46:25 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/module/Module.java 2014-01-17 11:42:28 +0000
@@ -95,6 +95,11 @@
return module;
}
+ public String getIconFallback()
+ {
+ return icon != null ? icon : name + ".png";
+ }
+
// -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2013-12-29 15:16:57 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2014-01-17 11:42:28 +0000
@@ -55,6 +55,7 @@
</bean>
<!-- Security : Action -->
+
<bean id="restrictOrganisationUnitsAction" class="org.hisp.dhis.security.action.RestrictOrganisationUnitsAction"
scope="prototype">
<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />