You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/06/21 15:53:32 UTC

cvs commit: jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/screens FluxScreen.java

jvanzyl     01/06/21 06:53:32

  Modified:    src/java/org/apache/turbine/flux/modules/screens
                        FluxScreen.java
  Log:
  - using RunData setLayoutTemplate methods directly
  - only setting the layout after the user has gained access, this
    was in part causing the weird layout mismatch problem. this was
    also be caused by the Default screen in the base of the flux
    package which John warned me about ;-) man we need a policy
    service.
  
  Revision  Changes    Path
  1.2       +20 -25    jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/screens/FluxScreen.java
  
  Index: FluxScreen.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-flux/src/java/org/apache/turbine/flux/modules/screens/FluxScreen.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FluxScreen.java	2001/03/26 00:49:41	1.1
  +++ FluxScreen.java	2001/06/21 13:53:30	1.2
  @@ -130,44 +130,39 @@
       {
           boolean isAuthorized = false;
   
  -        /*
  -         * Grab the Flux Admin role listed in the Flux.properties
  -         * file that is included in the the standard
  -         * TurbineResources.properties file.
  -         */
  +        // Grab the Flux Admin role listed in the Flux.properties
  +        // file that is included in the the standard
  +        // TurbineResources.properties file.
           String fluxAdminRole = TurbineResources.getString("flux.admin.role");
   
           AccessControlList acl = data.getACL();
   
           if (acl==null || ! acl.hasRole(fluxAdminRole))
           {
  -            data.getTemplateInfo().setScreenTemplate(
  +            data.setScreenTemplate(
                   TurbineResources.getString("template.login"));
               
  -            data.setScreen(
  -                TurbineResources.getString("screen.login"));
  -
               isAuthorized = false;
           }
           else if(acl.hasRole(fluxAdminRole))
           {
  +            // Set the layout now that the user has
  +            // gained access.
  +            if (TurbineResources.getString("flux.mode").equalsIgnoreCase("embedded"))
  +            {
  +                data.setLayoutTemplate(
  +                    TurbineResources.getString("flux.embedded.layout"));
  +            }
  +            else
  +            {
  +                // This could probably be set to a default value
  +                // because if running in stand-alone we know what
  +                // layout template to use.
  +                data.setLayoutTemplate(
  +                    TurbineResources.getString("flux.stand.alone.layout"));
  +            }
  +            
               isAuthorized = true;
  -        }
  -
  -        if (TurbineResources.getString("flux.mode").equalsIgnoreCase("embedded"))
  -        {
  -            data.getTemplateInfo().setLayoutTemplate(
  -                TurbineResources.getString("flux.embedded.layout"));
  -        }
  -        else
  -        {
  -            /* 
  -             * This could probably be set to a default value
  -             * because if running in stand-alone we know what
  -             * layout template to use.
  -             */
  -            data.getTemplateInfo().setLayoutTemplate(
  -                TurbineResources.getString("flux.stand.alone.layout"));
           }
   
           return isAuthorized;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org