taylor      2002/06/20 15:56:48

  Modified:    src/java/org/apache/jetspeed/modules/actions Tag:
                        security_14 JLogoutUser.java
                        JetspeedAccessController.java
                        JetspeedSessionValidator.java
                        TemplateSessionValidator.java
               src/java/org/apache/jetspeed/modules/actions/controls Tag:
                        security_14 Close.java Customize.java Maximize.java
                        Minimize.java Restore.java
               src/java/org/apache/jetspeed/om/security Tag: security_14
                        BaseJetspeedUser.java
               src/java/org/apache/jetspeed/portal/controls Tag:
                        security_14 VelocityPortletControl.java
               src/java/org/apache/jetspeed/services Tag: security_14
                        JetspeedSecurity.java
               src/java/org/apache/jetspeed/services/profiler Tag:
                        security_14 JetspeedProfilerService.java
               src/java/org/apache/jetspeed/services/psmlmanager Tag:
                        security_14 CastorPsmlManagerService.java
               src/java/org/apache/jetspeed/services/security Tag:
                        security_14 JetspeedDBSecurityService.java
                        JetspeedSecurityService.java
               webapp/WEB-INF/conf Tag: security_14
                        JetspeedResources.properties
                        JetspeedSecurity.properties
                        JetspeedSecurity.template
               webapp/WEB-INF/db Tag: security_14 jetspeed.properties
                        jetspeed.script
  Log:
  - Completed conversion of anonymous user to 'just another user' in profiler, security
    (Santiago also did this on the main branch. Its going to be a merge problem, wish 
you asked me first...)
  - Fixed bug on all actions to allow for the anonymous user to have action buttons
  - Added feature to actions to disable action buttons for 'all users' or 'anonymous 
user' if you don't want to use security to control actions (good for use with 
NoSecurity ACL)
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.3   +2 -2      
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JLogoutUser.java
  
  Index: JLogoutUser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JLogoutUser.java,v
  retrieving revision 1.5.2.2
  retrieving revision 1.5.2.3
  diff -u -r1.5.2.2 -r1.5.2.3
  --- JLogoutUser.java  20 Jun 2002 04:30:27 -0000      1.5.2.2
  +++ JLogoutUser.java  20 Jun 2002 22:56:44 -0000      1.5.2.3
  @@ -124,13 +124,13 @@
             }
           }        
   
  -        JetspeedSecurity.logout();
  -
           // use the standard turbine logout facility
           if ( JetspeedResources.getBoolean("automatic.logout.save", false) )
           {
               JetspeedSecurity.saveUser((JetspeedUser)data.getUser());
           }
  +
  +        JetspeedSecurity.logout();
   
           data.setMessage(JetspeedResources.getString(
               TurbineConstants.LOGOUT_MESSAGE));
  
  
  
  1.4.2.3   +31 -3     
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedAccessController.java
  
  Index: JetspeedAccessController.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedAccessController.java,v
  retrieving revision 1.4.2.2
  retrieving revision 1.4.2.3
  diff -u -r1.4.2.2 -r1.4.2.3
  --- JetspeedAccessController.java     19 Jun 2002 21:41:23 -0000      1.4.2.2
  +++ JetspeedAccessController.java     20 Jun 2002 22:56:44 -0000      1.4.2.3
  @@ -78,6 +78,8 @@
   {
       public void doPerform( RunData data ) throws Exception
       {
  +        JetspeedUser user = (JetspeedUser)data.getUser();
  +
           getACL(data);
           JetspeedRunData jdata = null;
           
  @@ -92,13 +94,39 @@
               return;
           }
   
  +        Profile currentProfile = jdata.getProfile();
  +
  +if (currentProfile != null)
  +{
  +    System.out.println("$$$ currentProfile = " + currentProfile.toString());
  +
  +}
  +else
  +{
  +    System.out.println("$$$ currentProfile = NULLL");
  +
  +}
  +
          // get the profile and store it in the RunData
           Profile newProfile = Profiler.getProfile(jdata);
  -        Profile currentProfile = jdata.getProfile();
  -        
  +
  +if (newProfile != null)
  +{
  +    System.out.println("$$$ newProfile = " + newProfile.toString());
  +}
  +else
  +{
  +    System.out.println("$$$ newProfile = NULLL");
  +}
  +
  +
  +
  +
           if ((currentProfile == null)
            || (!currentProfile.equals(newProfile)))
           {
  +System.out.println("$$$ SETTING NEW PROFILE = " + newProfile.toString());        
  +
               // the profile changed due to the request parameters,
               // change it in the RunData
               jdata.setProfile(newProfile);
  
  
  
  1.17.2.3  +5 -1      
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedSessionValidator.java
  
  Index: JetspeedSessionValidator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedSessionValidator.java,v
  retrieving revision 1.17.2.2
  retrieving revision 1.17.2.3
  diff -u -r1.17.2.2 -r1.17.2.3
  --- JetspeedSessionValidator.java     19 Jun 2002 21:41:23 -0000      1.17.2.2
  +++ JetspeedSessionValidator.java     20 Jun 2002 22:56:44 -0000      1.17.2.3
  @@ -100,6 +100,7 @@
            super.doPerform(data);         
        
           JetspeedUser user = (JetspeedUser)data.getUser();
  +        System.out.println("JSV --, USER = " + user.getUserName());
   
           //if the user is not logged in and auto-login is enable - try and do it.
           if ( ( user==null || !user.hasLoggedIn() ) && 
JetspeedResources.getBoolean("automatic.logon.enable", false) ) {
  @@ -160,6 +161,9 @@
               jdata.setJs_peid(paramPortlet);
           }
           
  +        JetspeedUser user2 = (JetspeedUser)data.getUser();
  +        System.out.println("JSV --END, USER = " + user2.getUserName());
  +
       }
   
       /**
  
  
  
  1.1.2.2   +9 -2      
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/Attic/TemplateSessionValidator.java
  
  Index: TemplateSessionValidator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/Attic/TemplateSessionValidator.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- TemplateSessionValidator.java     10 Jun 2002 05:36:19 -0000      1.1.2.1
  +++ TemplateSessionValidator.java     20 Jun 2002 22:56:45 -0000      1.1.2.2
  @@ -92,11 +92,15 @@
           data.populate();
   
           // The user may have not logged in, so create a "guest" user.
  -        if ( data.getUser() == null )
  +        if ( data.getUser() == null)
           {
               data.setUser(JetspeedSecurity.getAnonymousUser());
  +            String username = data.getUser().getUserName();
  +            System.out.println("user 2 = " + username);
               data.save();
           }
  +        String Z = data.getUser().getUserName();
  +        System.out.println("Z AFTER user 2 = " + Z);
   
           // make sure we have some way to return a response
           if ( !data.hasScreen() &&
  @@ -152,6 +156,9 @@
           {
               data.setScreen(null);
           }
  +        String ZZZ = data.getUser().getUserName();
  +        System.out.println("ZZZ AFTER user 2 = " + ZZZ);
  +
       }
   
       /**
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.1   +1 -1      
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Close.java
  
  Index: Close.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Close.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- Close.java        13 Mar 2002 05:41:15 -0000      1.6
  +++ Close.java        20 Jun 2002 22:56:45 -0000      1.6.2.1
  @@ -78,7 +78,7 @@
       {
   
           // Only logged in users can minmize
  -        if( rundata.getUser() == null || !rundata.getUser().hasLoggedIn() )
  +        if( rundata.getUser() == null)
           {
               return;
           }
  
  
  
  1.8.2.1   +1 -1      
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Customize.java
  
  Index: Customize.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Customize.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- Customize.java    1 Apr 2002 18:05:57 -0000       1.8
  +++ Customize.java    20 Jun 2002 22:56:45 -0000      1.8.2.1
  @@ -84,7 +84,7 @@
        */    
       public void doPerform( RunData rundata ) throws Exception
       {
  -        if( rundata.getUser() == null || !rundata.getUser().hasLoggedIn() )
  +        if( rundata.getUser() == null)
           {
               return;
           }
  
  
  
  1.9.2.1   +1 -1      
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Maximize.java
  
  Index: Maximize.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Maximize.java,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- Maximize.java     7 May 2002 15:16:08 -0000       1.9
  +++ Maximize.java     20 Jun 2002 22:56:45 -0000      1.9.2.1
  @@ -83,7 +83,7 @@
       public void doPerform( RunData rundata ) throws Exception
       {
           // Only logged in users can maximize
  -        if( rundata.getUser() == null || !rundata.getUser().hasLoggedIn() )
  +        if( rundata.getUser() == null)
           {
               return;
           }
  
  
  
  1.5.2.1   +7 -2      
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Minimize.java
  
  Index: Minimize.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Minimize.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- Minimize.java     22 Mar 2002 18:42:06 -0000      1.5
  +++ Minimize.java     20 Jun 2002 22:56:45 -0000      1.5.2.1
  @@ -80,7 +80,7 @@
       public void doPerform( RunData rundata ) throws Exception
       {
           // Only logged in users can minmize
  -        if( rundata.getUser() == null || !rundata.getUser().hasLoggedIn() )
  +        if( rundata.getUser() == null)
           {
               return;
           }
  @@ -107,7 +107,12 @@
           // Now set the portlet to minimized
           if (( portlet != null )&&( portlet instanceof PortletState ))
           {
  -            ((PortletState)portlet).setMinimized( true, rundata );
  +            System.out.println("peid = " + peid);
  +            System.out.println("portlet id = " + portlet.getID());
  +            if (portlet.getID().equals(peid))
  +            {
  +                ((PortletState)portlet).setMinimized( true, rundata );
  +            }
           }
       }
   }
  
  
  
  1.11.2.1  +1 -1      
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Restore.java
  
  Index: Restore.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Restore.java,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- Restore.java      7 May 2002 15:16:08 -0000       1.11
  +++ Restore.java      20 Jun 2002 22:56:45 -0000      1.11.2.1
  @@ -80,7 +80,7 @@
       public void doPerform( RunData rundata ) throws Exception
       {
           // Only logged in users can Restored
  -        if( rundata.getUser() == null || !rundata.getUser().hasLoggedIn() )
  +        if( rundata.getUser() == null)
           {
               return;
           }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.6   +12 -4     
jakarta-jetspeed/src/java/org/apache/jetspeed/om/security/BaseJetspeedUser.java
  
  Index: BaseJetspeedUser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/security/BaseJetspeedUser.java,v
  retrieving revision 1.3.2.5
  retrieving revision 1.3.2.6
  diff -u -r1.3.2.5 -r1.3.2.6
  --- BaseJetspeedUser.java     19 Jun 2002 21:41:24 -0000      1.3.2.5
  +++ BaseJetspeedUser.java     20 Jun 2002 22:56:46 -0000      1.3.2.6
  @@ -54,6 +54,7 @@
   package org.apache.jetspeed.om.security;
   
   import org.apache.jetspeed.services.JetspeedUserManagement;
  +import org.apache.jetspeed.services.JetspeedAuthentication;
   
   import org.apache.turbine.om.security.User;
   import java.io.ByteArrayOutputStream;
  @@ -680,17 +681,24 @@
        */
       public void valueUnbound(HttpSessionBindingEvent hsbe)
       {
  +
           try
           {
  -            if (hasLoggedIn())
  +            java.util.Date now = new java.util.Date();
  +            //System.out.println("*********** value unbound ********************: " 
+ now.toString());
  +            if (this.hasLoggedIn())
               {
  -               if ( JetspeedResources.getBoolean("automatic.logout.save", false) )
  +                if ( JetspeedResources.getBoolean("automatic.logout.save", false) )
  +                {
                       JetspeedUserManagement.saveUser(this);
  +                }
  +                JetspeedAuthentication.logout();
               }
  +
           }
           catch ( Exception e )
           {
  -            Log.error("TurbineUser.valueUnbobund(): " + e.getMessage(), e);
  +            Log.error("TurbineUser.valueUnbound(): " + e.getMessage(), e);
   
               // To prevent messages being lost in case the logging system
               // goes away before sessions get unbound on servlet container
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.16.2.1  +16 -2     
jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletControl.java
  
  Index: VelocityPortletControl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletControl.java,v
  retrieving revision 1.16
  retrieving revision 1.16.2.1
  diff -u -r1.16 -r1.16.2.1
  --- VelocityPortletControl.java       22 Apr 2002 03:22:06 -0000      1.16
  +++ VelocityPortletControl.java       20 Jun 2002 22:56:46 -0000      1.16.2.1
  @@ -73,6 +73,8 @@
   import org.apache.jetspeed.util.template.JetspeedTool;
   import org.apache.jetspeed.util.template.JetspeedLink;
   import org.apache.jetspeed.util.template.JetspeedLinkFactory;
  +import org.apache.jetspeed.services.JetspeedSecurity;
  +import org.apache.jetspeed.om.security.JetspeedUser;
   
   // Ecs stuff
   import org.apache.ecs.ConcreteElement;
  @@ -196,7 +198,19 @@
           List actions = new Vector();
           JetspeedLink jsLink = null;
           JetspeedRunData jdata = (JetspeedRunData)rundata;
  -        
  +
  +        // disable actions option
  +        if (JetspeedSecurity.areActionsDisabledForAllUsers())
  +        {
  +            return actions;
  +        }
  +        JetspeedUser user = jdata.getJetspeedUser();
  +        if (JetspeedSecurity.areActionsDisabledForAnon() && false == 
user.hasLoggedIn())
  +        {
  +            return actions;
  +        }
  +
  +
           // list the available actiosn for this portlet
           if (portlet instanceof PortletState)
           {            
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.10.2.13 +16 -1     
jakarta-jetspeed/src/java/org/apache/jetspeed/services/JetspeedSecurity.java
  
  Index: JetspeedSecurity.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/JetspeedSecurity.java,v
  retrieving revision 1.10.2.12
  retrieving revision 1.10.2.13
  diff -u -r1.10.2.12 -r1.10.2.13
  --- JetspeedSecurity.java     19 Jun 2002 21:41:24 -0000      1.10.2.12
  +++ JetspeedSecurity.java     20 Jun 2002 22:56:47 -0000      1.10.2.13
  @@ -547,6 +547,21 @@
          ((JetspeedSecurityService)getService()).resetDisableAccountCheck(username);
       }
   
  +    /**
  +     * @see JetspeedSecurityService#areActionsDisabledForAnon
  +     */
  +    public static boolean areActionsDisabledForAnon()
  +    {
  +        return ((JetspeedSecurityService)getService()).areActionsDisabledForAnon();
  +    }
  +
  +    /**
  +     * @see JetspeedSecurityService#areActionsDisabledForAllUsers
  +     */
  +    public static boolean areActionsDisabledForAllUsers()
  +    {
  +        return 
((JetspeedSecurityService)getService()).areActionsDisabledForAllUsers();
  +    }
   
   
       //////////////////////////////////////////////////////////////////////////
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.29.2.5  +17 -21    
jakarta-jetspeed/src/java/org/apache/jetspeed/services/profiler/JetspeedProfilerService.java
  
  Index: JetspeedProfilerService.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/profiler/JetspeedProfilerService.java,v
  retrieving revision 1.29.2.4
  retrieving revision 1.29.2.5
  diff -u -r1.29.2.4 -r1.29.2.5
  --- JetspeedProfilerService.java      18 Jun 2002 01:53:17 -0000      1.29.2.4
  +++ JetspeedProfilerService.java      20 Jun 2002 22:56:47 -0000      1.29.2.5
  @@ -292,7 +292,7 @@
               {
                   try
                   {
  -                    Iterator roles = JetspeedSecurity.getRoles(user.getName());
  +                    Iterator roles = JetspeedSecurity.getRoles(user.getUserName());
                       if (roles != null)
                       {
                           while (roles.hasNext())
  @@ -357,28 +357,24 @@
                   else  // it must be a user resource or anonymous resource
                   {
                       // accessing another user's resource
  -                    param = rundata.getParameters().getString( Profiler.PARAM_USER 
);
  -                    if (null != param) 
  -                    { 
  +                    //param = rundata.getParameters().getString( 
Profiler.PARAM_USER );
  +                    //if (null != param) 
  +                    //{ 
                           // USER Resource
                           // TODO: Check for anonymous user flag, since we could be 
configuring the anonymous user
  -                        if (param.equals(Profiler.PARAM_ANON))
  -                            profile.setAnonymous(true);
  -                        else
  -                            profile.setUser( JetspeedSecurity.getUser(param) );
  -                    }
  -                    else
  -                    {                        
  +                        //if (param.equals(Profiler.PARAM_ANON))
  +                        //{
  +                        //    profile.setAnonymous(true);
  +                        //}
  +                        //profile.setUser( JetspeedSecurity.getUser(param) );
  +                    //}
  +                    //else
  +                    //{                        
                           // is it a anonymous access?
  -                        if (user.hasLoggedIn())
  -                        {
  -                            profile.setUser( rundata.getJetspeedUser() );
  -                        }
  -                        else  // anonymous
  -                        {
  -                            profile.setAnonymous(true);
  -                        }
  -                    }
  +                        profile.setAnonymous(false); //!user.hasLoggedIn());
  +                        System.out.println("user = " + 
rundata.getJetspeedUser().getUserName());
  +                        profile.setUser( rundata.getJetspeedUser() );
  +                    //}
                   }
               }     
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.23.2.4  +1 -2      
jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java
  
  Index: CastorPsmlManagerService.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java,v
  retrieving revision 1.23.2.3
  retrieving revision 1.23.2.4
  diff -u -r1.23.2.3 -r1.23.2.4
  --- CastorPsmlManagerService.java     19 Jun 2002 21:41:25 -0000      1.23.2.3
  +++ CastorPsmlManagerService.java     20 Jun 2002 22:56:47 -0000      1.23.2.4
  @@ -525,7 +525,6 @@
           
           if (doc == null) return false;
           File f = getFile(fileOrUrl);
  -System.out.println("file or url = " + fileOrUrl);
           if (f == null)
           {
               f = new File(fileOrUrl);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.18.2.3  +34 -2     
jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/JetspeedDBSecurityService.java
  
  Index: JetspeedDBSecurityService.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/JetspeedDBSecurityService.java,v
  retrieving revision 1.18.2.2
  retrieving revision 1.18.2.3
  diff -u -r1.18.2.2 -r1.18.2.3
  --- JetspeedDBSecurityService.java    7 Jun 2002 10:02:06 -0000       1.18.2.2
  +++ JetspeedDBSecurityService.java    20 Jun 2002 22:56:47 -0000      1.18.2.3
  @@ -116,7 +116,8 @@
       private final static String CONFIG_LOGON_STRIKE_MAX = "logon.strike.max";
       private final static String CONFIG_LOGON_STRIKE_INTERVAL = 
"logon.strike.interval";
       private final static String CONFIG_LOGON_AUTO_DISABLE = "logon.auto.disable";
  -
  +    private final static String CONFIG_ACTIONS_ANON_DISABLE = 
"actions.anon.disable";
  +    private final static String CONFIG_ACTIONS_ALLUSERS_DISABLE = 
"actions.allusers.disable";
   
       private final static String CONFIG_NEWUSER_ROLES     = "newuser.roles";
       private final static String CONFIG_DEFAULT_PERMISSION_LOGGEDIN     = 
"permission.default.loggedin";
  @@ -129,6 +130,8 @@
       boolean caseInsensitiveUsername = false;
       boolean caseInsensitivePassword = false;
       boolean caseInsensitiveUpper = true;
  +    boolean actionsAnonDisable = true;
  +    boolean actionsAllUsersDisable = false;
   
       int strikeCount = 3;             // 3 within the interval
       int strikeMax = 20;              // 20 total failures 
  @@ -179,6 +182,8 @@
           strikeMax = serviceConf.getInt(CONFIG_LOGON_STRIKE_MAX, strikeMax);
   
           autoLogonDisable = serviceConf.getBoolean(CONFIG_LOGON_AUTO_DISABLE, 
autoLogonDisable);
  +        actionsAnonDisable = serviceConf.getBoolean(CONFIG_ACTIONS_ANON_DISABLE, 
actionsAnonDisable);
  +        actionsAllUsersDisable = 
serviceConf.getBoolean(CONFIG_ACTIONS_ALLUSERS_DISABLE, actionsAllUsersDisable);
   
           // initialization done
           setInit(true);
  @@ -356,6 +361,7 @@
           return autoLogonDisable;
       }
   
  +    
       /*
        * Logon Failure / Account Disabling Feature
        *    
  @@ -454,5 +460,31 @@
                                                          action);
       }
        */
  +
  +    /*
  +     * Security configuration setting to disable all action buttons for the Anon 
user
  +     * This setting is readonly and is edited in the JetspeedSecurity deployment
  +     *    
  +     *
  +     * @return True if the feature actions are disabled for the anon user
  +     *
  +     */
  +    public boolean areActionsDisabledForAnon()
  +    {
  +        return actionsAnonDisable;
  +    }
  +
  +    /*
  +     * Security configuration setting to disable all action buttons for all users
  +     * This setting is readonly and is edited in the JetspeedSecurity deployment
  +     *    
  +     *
  +     * @return True if the feature actions are disabled for the all users
  +     *
  +     */
  +    public boolean areActionsDisabledForAllUsers()
  +    {
  +        return actionsAllUsersDisable;
  +    }
   
   }
  
  
  
  1.7.2.4   +22 -1     
jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/JetspeedSecurityService.java
  
  Index: JetspeedSecurityService.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/security/JetspeedSecurityService.java,v
  retrieving revision 1.7.2.3
  retrieving revision 1.7.2.4
  diff -u -r1.7.2.3 -r1.7.2.4
  --- JetspeedSecurityService.java      17 Jun 2002 21:27:04 -0000      1.7.2.3
  +++ JetspeedSecurityService.java      20 Jun 2002 22:56:47 -0000      1.7.2.4
  @@ -264,4 +264,25 @@
        */
       //public boolean checkPermission(JetspeedRunData runData, String action, 
RegistryEntry entry);
   
  +   /*
  +     * Security configuration setting to disable all action buttons for the Anon 
user
  +     * This setting is readonly and is edited in the JetspeedSecurity deployment
  +     *    
  +     *
  +     * @return True if the feature actions are disabled for the anon user
  +     *
  +     */
  +    public boolean areActionsDisabledForAnon();
  +
  +    /*
  +     * Security configuration setting to disable all action buttons for all users
  +     * This setting is readonly and is edited in the JetspeedSecurity deployment
  +     *    
  +     *
  +     * @return True if the feature actions are disabled for the all users
  +     *
  +     */
  +    public boolean areActionsDisabledForAllUsers();
  +
  +
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.77.2.4  +2 -1      
jakarta-jetspeed/webapp/WEB-INF/conf/JetspeedResources.properties
  
  Index: JetspeedResources.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/JetspeedResources.properties,v
  retrieving revision 1.77.2.3
  retrieving revision 1.77.2.4
  diff -u -r1.77.2.3 -r1.77.2.4
  --- JetspeedResources.properties      20 Jun 2002 05:30:31 -0000      1.77.2.3
  +++ JetspeedResources.properties      20 Jun 2002 22:56:48 -0000      1.77.2.4
  @@ -526,3 +526,4 @@
   #           Expires       = (current time + n seconds)
   http.lifetime=0
   
  +
  
  
  
  1.1.2.20  +6 -54     
jakarta-jetspeed/webapp/WEB-INF/conf/Attic/JetspeedSecurity.properties
  
  Index: JetspeedSecurity.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/Attic/JetspeedSecurity.properties,v
  retrieving revision 1.1.2.19
  retrieving revision 1.1.2.20
  diff -u -r1.1.2.19 -r1.1.2.20
  --- JetspeedSecurity.properties       20 Jun 2002 04:30:11 -0000      1.1.2.19
  +++ JetspeedSecurity.properties       20 Jun 2002 22:56:48 -0000      1.1.2.20
  @@ -116,57 +116,9 @@
   # anonymous user
   services.JetspeedSecurity.user.anonymous=anon
   
  -# -------------------------------------------------------------------
  -#
  -# To Be Deleted soon...
  -#
  -# -------------------------------------------------------------------
  -#
  -# This is the class that implements the User interface.
  -# You want to override this setting only if you want your User
  -# implementation to provide application specific addtional
  -# functionality.
  -#
  -# Default: org.apache.turbine.om.security.TurbineUser
  -#
  -
  -# services.SecurityService.user.class=org.apache.turbine.om.security.TurbineUser
  -# 
services.SecurityService.user.class=org.apache.jetspeed.om.security.BaseTurbineUser
  -
  -#
  -# This setting is DBSecurityService specific - this class is consulted for the names
  -# of the columns in the users' tables for the purpose of creating join queries.
  -# If you use your own User implementation in conjunction with DBSecurityService,
  -# it's peer class must implement org.apache.turbine.om.security.peer.UserPeer 
interface,
  -# and you need to specify the name of the peer class here.
  -#
  -# Defalut: org.apache.turbine.om.security.peer.TurbineUserPeer
  -#
  -# 
services.SecurityService.userPeer.class=org.apache.turbine.om.security.peer.TurbineUserPeer
  -# 
services.SecurityService.userPeer.class=org.apache.jetspeed.om.security.peer.TurbineUserPeerAdapter
  -
  -#
  -# This is the class that implements UserManager interface.
  -# Override this setting if you want your User information stored
  -# on a different medium (LADP directory is a good example).
  -# Default implementation uses Peers and a relational database .
  -#
  -# 
services.SecurityService.user.manager=org.apache.turbine.services.security.db.DBUserManager
  -
  -# -------------------------------------------------------------------
  -#
  -#  P E E R S
  -#
  -# -------------------------------------------------------------------
  -# Supplies Turbine with information about the database schema, which
  -# can simplify any required Peer classes.
  -#
  -# Default: org.apache.turbine.util.db.map.TurbineMapBuilder
  -# -------------------------------------------------------------------
  -
  -# database.maps.builder=org.apache.turbine.util.db.map.TurbineMapBuilder
  -# 
database.maps.builder=org.apache.jetspeed.om.security.db.map.JetspeedMapBuilderAdapter
  -# 
database.maps.builder=org.apache.jetspeed.om.security.map.TurbineUserMapBuilderAdapter
  -
  -
  +#########################################
  +# Action buttons                        #
  +#########################################
  +services.JetspeedSecurity.actions.anon.disable=true
  +services.JetspeedSecurity.action.allusers.disable=false
   
  
  
  
  1.1.2.11  +6 -54     
jakarta-jetspeed/webapp/WEB-INF/conf/Attic/JetspeedSecurity.template
  
  Index: JetspeedSecurity.template
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/Attic/JetspeedSecurity.template,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- JetspeedSecurity.template 20 Jun 2002 04:30:11 -0000      1.1.2.10
  +++ JetspeedSecurity.template 20 Jun 2002 22:56:48 -0000      1.1.2.11
  @@ -116,57 +116,9 @@
   # anonymous user
   services.JetspeedSecurity.user.anonymous=anon
   
  -# -------------------------------------------------------------------
  -#
  -# To Be Deleted soon...
  -#
  -# -------------------------------------------------------------------
  -#
  -# This is the class that implements the User interface.
  -# You want to override this setting only if you want your User
  -# implementation to provide application specific addtional
  -# functionality.
  -#
  -# Default: org.apache.turbine.om.security.TurbineUser
  -#
  -
  -# services.SecurityService.user.class=org.apache.turbine.om.security.TurbineUser
  -# 
services.SecurityService.user.class=org.apache.jetspeed.om.security.BaseTurbineUser
  -
  -#
  -# This setting is DBSecurityService specific - this class is consulted for the names
  -# of the columns in the users' tables for the purpose of creating join queries.
  -# If you use your own User implementation in conjunction with DBSecurityService,
  -# it's peer class must implement org.apache.turbine.om.security.peer.UserPeer 
interface,
  -# and you need to specify the name of the peer class here.
  -#
  -# Defalut: org.apache.turbine.om.security.peer.TurbineUserPeer
  -#
  -# 
services.SecurityService.userPeer.class=org.apache.turbine.om.security.peer.TurbineUserPeer
  -# 
services.SecurityService.userPeer.class=org.apache.jetspeed.om.security.peer.TurbineUserPeerAdapter
  -
  -#
  -# This is the class that implements UserManager interface.
  -# Override this setting if you want your User information stored
  -# on a different medium (LADP directory is a good example).
  -# Default implementation uses Peers and a relational database .
  -#
  -# 
services.SecurityService.user.manager=org.apache.turbine.services.security.db.DBUserManager
  -
  -# -------------------------------------------------------------------
  -#
  -#  P E E R S
  -#
  -# -------------------------------------------------------------------
  -# Supplies Turbine with information about the database schema, which
  -# can simplify any required Peer classes.
  -#
  -# Default: org.apache.turbine.util.db.map.TurbineMapBuilder
  -# -------------------------------------------------------------------
  -
  -# database.maps.builder=org.apache.turbine.util.db.map.TurbineMapBuilder
  -# 
database.maps.builder=org.apache.jetspeed.om.security.db.map.JetspeedMapBuilderAdapter
  -# 
database.maps.builder=org.apache.jetspeed.om.security.map.TurbineUserMapBuilderAdapter
  -
  -
  +#########################################
  +# Action buttons                        #
  +#########################################
  +services.JetspeedSecurity.actions.anon.disable=true
  +services.JetspeedSecurity.action.allusers.disable=false
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.11.2.10 +1 -1      jakarta-jetspeed/webapp/WEB-INF/db/jetspeed.properties
  
  Index: jetspeed.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/db/jetspeed.properties,v
  retrieving revision 1.11.2.9
  retrieving revision 1.11.2.10
  diff -u -r1.11.2.9 -r1.11.2.10
  --- jetspeed.properties       19 Jun 2002 05:14:12 -0000      1.11.2.9
  +++ jetspeed.properties       20 Jun 2002 22:56:48 -0000      1.11.2.10
  @@ -1,4 +1,4 @@
   #Hypersonic SQL database
  -#Tue Jun 18 22:13:22 PDT 2002
  +#Wed Jun 19 21:28:44 PDT 2002
   version=1.4
   modified=yes
  
  
  
  1.13.2.11 +15 -11    jakarta-jetspeed/webapp/WEB-INF/db/jetspeed.script
  
  Index: jetspeed.script
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/db/jetspeed.script,v
  retrieving revision 1.13.2.10
  retrieving revision 1.13.2.11
  diff -u -r1.13.2.10 -r1.13.2.11
  --- jetspeed.script   19 Jun 2002 05:20:37 -0000      1.13.2.10
  +++ jetspeed.script   20 Jun 2002 22:56:48 -0000      1.13.2.11
  @@ -125,10 +125,12 @@
   INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(340,1,1)
   INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(350,1,1)
   INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(360,1,1)
  -INSERT INTO ID_TABLE VALUES(1,'TURBINE_PERMISSION',230,10)
  -INSERT INTO ID_TABLE VALUES(2,'TURBINE_ROLE',320,10)
  -INSERT INTO ID_TABLE VALUES(3,'TURBINE_GROUP',250,10)
  -INSERT INTO ID_TABLE VALUES(4,'TURBINE_USER',370,10)
  +INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(370,1,1)
  +INSERT INTO TURBINE_USER_GROUP_ROLE VALUES(380,1,1)
  +INSERT INTO ID_TABLE VALUES(1,'TURBINE_PERMISSION',250,10)
  +INSERT INTO ID_TABLE VALUES(2,'TURBINE_ROLE',340,10)
  +INSERT INTO ID_TABLE VALUES(3,'TURBINE_GROUP',270,10)
  +INSERT INTO ID_TABLE VALUES(4,'TURBINE_USER',390,10)
   INSERT INTO ID_TABLE VALUES(5,'TURBINE_SCHEDULED_JOB',100,10)
   INSERT INTO ID_TABLE VALUES(6,'TURBINE_ROLE_PERMISSION',100,10)
   INSERT INTO ID_TABLE VALUES(7,'TURBINE_USER_GROUP_ROLE',100,10)
  @@ -148,17 +150,19 @@
   INSERT INTO COFFEES VALUES('JoeGrade',3,7.99,1,2)
   INSERT INTO COFFEES VALUES('CantThinkOfAnymoreGrade',4,7.99,1,2)
   /*C1*/CONNECT USER sa PASSWORD ""
  -/*C2*/CONNECT USER sa PASSWORD ""
  -SET AUTOCOMMIT FALSE
   /*C3*/CONNECT USER sa PASSWORD ""
  -/*C2*/DELETE FROM ID_TABLE WHERE ID_TABLE_ID=1
  -INSERT INTO ID_TABLE VALUES(1,'TURBINE_PERMISSION',230,10)
  +SET AUTOCOMMIT FALSE
  +/*C4*/CONNECT USER sa PASSWORD ""
  +/*C3*/DELETE FROM ID_TABLE WHERE ID_TABLE_ID=1
  +INSERT INTO ID_TABLE VALUES(1,'TURBINE_PERMISSION',250,10)
   DELETE FROM ID_TABLE WHERE ID_TABLE_ID=1
  -INSERT INTO ID_TABLE VALUES(1,'TURBINE_PERMISSION',240,10)
  +INSERT INTO ID_TABLE VALUES(1,'TURBINE_PERMISSION',260,10)
   COMMIT
   SET AUTOCOMMIT TRUE
  -/*C1*/INSERT INTO TURBINE_PERMISSION VALUES(230,'bogus',NULL)
  -DELETE FROM TURBINE_PERMISSION WHERE PERMISSION_ID=230
  +/*C1*/INSERT INTO TURBINE_PERMISSION VALUES(250,'bogus',NULL)
  +DELETE FROM TURBINE_PERMISSION WHERE PERMISSION_ID=250
  +COMMIT
  +ROLLBACK
   DELETE FROM TURBINE_PERMISSION WHERE PERMISSION_ID=2
   INSERT INTO TURBINE_PERMISSION VALUES(2,'customize',NULL)
   INSERT INTO TURBINE_ROLE_PERMISSION VALUES(1,7)
  
  
  

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

Reply via email to