← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12731: Removed authority

 

------------------------------------------------------------
revno: 12731
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-10-16 16:02:04 +0200
message:
  Removed authority
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/MappedRedirectStrategy.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties


--
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/src/main/java/org/hisp/dhis/security/MappedRedirectStrategy.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/MappedRedirectStrategy.java	2013-10-16 13:43:31 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/MappedRedirectStrategy.java	2013-10-16 14:02:04 +0000
@@ -81,7 +81,16 @@
     public void sendRedirect( HttpServletRequest request, HttpServletResponse response, String url )
         throws IOException
     {
-        Device device = deviceResolver.resolveDevice( request );
+        // ---------------------------------------------------------------------
+        // Check if redirect should be skipped - for cookie authentication only
+        // ---------------------------------------------------------------------
+
+        String authOnly = (String) request.getAttribute( PARAM_AUTH_ONLY );
+        
+        if ( "true".equals( authOnly ) )
+        {
+            return;
+        }
 
         // ---------------------------------------------------------------------
         // Ignore certain ajax requests
@@ -99,6 +108,8 @@
         // Redirect to mobile start pages
         // ---------------------------------------------------------------------
 
+        Device device = deviceResolver.resolveDevice( request );
+
         String mobileVersion = (String) request.getAttribute( PARAM_MOBILE_VERSION );
         mobileVersion = mobileVersion == null ? "desktop" : mobileVersion;
 
@@ -115,17 +126,6 @@
             url = getRootPath( request ) + "/";
         }
 
-        // ---------------------------------------------------------------------
-        // Check if redirect should be skipped - for cookie authentication only
-        // ---------------------------------------------------------------------
-
-        String authOnly = (String) request.getAttribute( PARAM_AUTH_ONLY );
-        
-        if ( "true".equals( authOnly ) )
-        {
-            return;
-        }
-
         log.debug( "Redirecting to " + url );
 
         super.sendRedirect( request, response, url );

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml	2013-10-08 13:19:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml	2013-10-16 14:02:04 +0000
@@ -59,7 +59,6 @@
       <param name="page">/dhis-web-maintenance-dataadmin/localeList.vm</param>
       <param name="menu">/dhis-web-maintenance-dataadmin/menu.vm</param>
 	  <param name="javascripts">javascript/locale.js</param>
-	  <param name="requiredAuthorities">F_LOCALE_MANAGEMENT</param>	  
     </action>
 
     <action name="getLocale"

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2013-10-11 07:11:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2013-10-16 14:02:04 +0000
@@ -234,7 +234,6 @@
 F_MYDATAMART_VIEW=Access my data mart
 F_METADATA_EXPORT=Export Meta-Data
 F_METADATA_IMPORT=Import Meta-Data
-F_LOCALE_MANAGEMENT=Locale Management
 F_LOCALE_ADD=Add Locale
 F_LOCALE_DELETE=Delete Locale