head	1.8;
access;
symbols
	TIGRIS_0_8_4:1.7.0.4
	TIGRIS_NOV_12_2000:1.7
	OLDHELM:1.7.0.2
	TIGRIS_NOV_11_2000:1.7
	TIGRIS_BASELINE:1.6;
locks; strict;
comment	@# @;


1.8
date	2000.12.06.19.52.22;	author leonardr;	state dead;
branches;
next	1.7;

1.7
date	2000.10.03.18.15.47;	author leonardr;	state Exp;
branches;
next	1.6;

1.6
date	2000.09.26.19.08.46;	author dlr;	state Exp;
branches;
next	1.5;

1.5
date	2000.09.26.02.29.30;	author dlr;	state Exp;
branches;
next	1.4;

1.4
date	2000.09.26.02.24.34;	author dlr;	state Exp;
branches;
next	1.3;

1.3
date	2000.09.26.01.20.02;	author dlr;	state Exp;
branches;
next	1.2;

1.2
date	2000.09.26.00.48.39;	author leonardr;	state Exp;
branches;
next	1.1;

1.1
date	2000.09.25.22.40.59;	author leonardr;	state Exp;
branches;
next	;


desc
@@


1.8
log
@Begone unused classes that exist elsewhere
@
text
@/* ================================================================
 * Copyright (c) 2000 Collab.Net.  All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 * 
 * 1. Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * 
 * 3. The end-user documentation included with the redistribution, if
 * any, must include the following acknowlegement: "This product includes
 * software developed by Collab.Net (http://www.Collab.Net/)."
 * Alternately, this acknowlegement may appear in the software itself, if
 * and wherever such third-party acknowlegements normally appear.
 * 
 * 4. The hosted project names must not be used to endorse or promote
 * products derived from this software without prior written
 * permission. For written permission, please contact info@@collab.net.
 * 
 * 5. Products derived from this software may not use the "Tigris" name
 * nor may "Tigris" appear in their names without prior written
 * permission of Collab.Net.
 * 
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL COLLAB.NET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ====================================================================
 * 
 * This software consists of voluntary contributions made by many
 * individuals on behalf of Collab.Net.
 */


package org.tigris.helm.security;

import org.webmacro.util.*;
import org.webmacro.servlet.*;
import org.webmacro.engine.*;
import org.webmacro.broker.*;

import javax.servlet.*;
import javax.servlet.http.*;

import java.sql.*;
import java.io.IOException;
import com.sun.java.util.collections.ArrayList;
import com.sun.java.util.collections.Iterator;
import com.workingdogs.village.DataSetException;
import gnu.regexp.RE;

import org.joist.security.PermissionSet;
import org.joist.security.RedirectException;
import org.joist.security.SecureServlet;
import org.joist.database.DataManager;
import org.joist.database.UserRoleManager;
import org.joist.database.JoistDatabaseException;

import org.tigris.helm.tool.UpdateException;


/**
 * Present a form for the addition of a new UserGroup.
 */
public class UserGroupTest extends SecureServlet {

    static private Log log = new Log("ustTest", "UserGroupTest");
    static private boolean debug = true;
    
    protected String processRequest(Connection connection, WebContext context)
        throws HandlerException, RedirectException {

        String templateName = super.processRequest(connection, context);
    
        // Determine which button was pushed
        String action = (String) context.get("action");
        if (debug) log.debug("action=" + action);      

        DataManager dataMgr = getSessionManager(context).getDataManager();
        CompositeManager mgr = (UserGroupManager)dataMgr.getManager
            ("org.tigris.helm.security.UserGroupManager");
        if (action.equals("Add UserGroup")) {
            String newUserGroup = (String) context.get("newUserGroup");
            //        try {
            //This needs to be changed to create a new User who
            //has its "isSet" flag set.
            //TUserManager.addUser(connection,newUserGroup);
            //        }
        }

        //context.put("username", username);
        try {
            context.put("userSetList", mgr.getComposites(connection));
        } catch (SQLException e) {
            // TODO
        } catch (DataSetException e) {
            // TODO
        }
        return templateName;
    }

}
@


1.7
log
@Renamed, will move in repo.
@
text
@@


1.6
log
@Switched 'XxxSet' back to 'Xxxset' to maintain database consistancy with join tables.
@
text
@d76 1
a76 1
 * Present a form for the addition of a new Userset.
d78 1
a78 1
public class UsersetTest extends SecureServlet {
d80 1
a80 1
    static private Log log = new Log("ustTest", "UsersetTest");
d93 4
a96 4
        CompositeManager mgr = (UsersetManager)dataMgr.getManager
            ("org.tigris.helm.security.UsersetManager");
        if (action.equals("Add Userset")) {
            String newUserset = (String) context.get("newUserset");
d100 1
a100 1
            //TUserManager.addUser(connection,newUserset);
@


1.5
log
@Obliterated evil tab characters.  No other change.
@
text
@d76 1
a76 1
 * Present a form for the addition of a new UserSet.
d78 1
a78 1
public class UserSetTest extends SecureServlet {
d80 1
a80 1
    static private Log log = new Log("ustTest", "UserSetTest");
d93 4
a96 4
        CompositeManager mgr = (UserSetManager)dataMgr.getManager
            ("org.tigris.helm.security.UserSetManager");
        if (action.equals("Add UserSet")) {
            String newUserSet = (String) context.get("newUserSet");
d100 1
a100 1
            //TUserManager.addUser(connection,newUserSet);
@


1.4
log
@Renamed xxxset to xxxSet.  Going to move the files in the repository to preserve history.
@
text
@d84 1
a84 1
	throws HandlerException, RedirectException {
d86 5
a90 5
	String templateName = super.processRequest(connection, context);
	
	// Determine which button was pushed
	String action = (String) context.get("action");
	if (debug) log.debug("action=" + action);      
d95 3
a97 3
	if (action.equals("Add UserSet")) {
	    String newUserSet = (String) context.get("newUserSet");
	    //	    try {
d101 2
a102 2
	    //	    }
	}
d104 4
a107 4
	//context.put("username", username);
	try {
	    context.put("userSetList", mgr.getComposites(connection));
	} catch (SQLException e) {
d109 1
a109 1
	} catch (DataSetException e) {
d111 2
a112 2
	}
	return templateName;
@


1.3
log
@Updated class members.
@
text
@a71 1
import org.tigris.helm.security.UsersetManager;
d76 1
a76 1
 * Present a form for the addition of a new Userset.
d78 1
a78 1
public class UsersetTest extends SecureServlet {
d80 1
a80 1
    static private Log log = new Log("ustTest", "UsersetTest");
d93 4
a96 4
        CompositeManager mgr = (UsersetManager)dataMgr.getManager
            ("org.tigris.helm.security.UsersetManager");
	if (action.equals("Add Userset")) {
	    String newUserset = (String) context.get("newUserset");
d100 1
a100 1
            //TUserManager.addUser(connection,newUserset);
d106 1
a106 1
	    context.put("usersetList", mgr.getComposites(connection));
d115 1
a115 1
} /* end class UserAdd */
@


1.2
log
@Made CompositeManager abstract and added its subclasses. Defanged
UsersetTest until the database is brought into line with CompositeManager.
@
text
@d48 1
a48 1
package org.tigris.helm.managertest;
d93 3
d99 3
a101 3
		//This needs to be changed to create a new User who
		//has its "isSet" flag set.
		//TUserManager.addUser(connection,newUserset);
d107 1
a107 1
	    context.put("usersetList", UsersetManager.getComposites(connection));
d109 1
d111 1
a111 1
    
@


1.1
log
@The start of Tigris' new permission system.
@
text
@d72 1
a72 2
import org.tigris.helm.database.TUserManager;
import org.tigris.helm.database.UsersetManager;
d95 5
a99 7
	    try {
		UsersetManager.addUserset(connection,newUserset);
	    } catch (UsersetManager.AlreadyExists e) {
		context.put("usersetExists","1");
	    } catch (SQLException e) {
	    } catch (DataSetException e) {
	    }
d104 1
a104 1
	    context.put("usersetList", UsersetManager.getUsersets(connection));
@

