mpoeschl    2003/07/28 16:33:20

  Modified:    src/tdk/apps/2/src/java/modules/screens SecureScreen.java
  Log:
  TurbineResources is deprecated use Turbine.getConfiguration
  
  Revision  Changes    Path
  1.2       +7 -7      
jakarta-turbine-tdk/src/tdk/apps/2/src/java/modules/screens/SecureScreen.java
  
  Index: SecureScreen.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-tdk/src/tdk/apps/2/src/java/modules/screens/SecureScreen.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SecureScreen.java 7 Sep 2001 01:40:10 -0000       1.1
  +++ SecureScreen.java 28 Jul 2003 23:33:20 -0000      1.2
  @@ -3,7 +3,7 @@
   /* ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -59,7 +59,7 @@
   import org.apache.turbine.modules.screens.VelocitySecureScreen;
   import org.apache.turbine.util.RunData;
   import org.apache.turbine.util.security.AccessControlList;
  -import org.apache.turbine.services.resources.TurbineResources;
  +import org.apache.turbine.Turbine;
   
   import org.apache.velocity.context.Context;
   
  @@ -81,22 +81,22 @@
        *
        * @param data Turbine information.
        * @return True if the user is authorized to access the screen.
  -     * @exception Exception, a generic exception.
  +     * @exception Exception a generic exception.
        */
  -    protected boolean isAuthorized( RunData data )  throws Exception
  +    protected boolean isAuthorized(RunData data)  throws Exception
       {
           boolean isAuthorized = false;
   
           AccessControlList acl = data.getACL();
   
  -        if (acl==null || ! acl.hasRole("turbine_root"))
  +        if (acl == null || !acl.hasRole("turbine_root"))
           {
               data.setScreenTemplate(
  -                TurbineResources.getString("template.login"));
  +                Turbine.getConfiguration().getString("template.login"));
   
               isAuthorized = false;
           }
  -        else if(acl.hasRole("turbine_root"))
  +        else if (acl.hasRole("turbine_root"))
           {
               isAuthorized = true;
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to