paulsp 02/05/27 05:57:11
Modified: src/java/org/apache/jetspeed/test Tag: security_14
TestBasicSecurity.java
Log:
General cleanup
Revision Changes Path
No revision
No revision
1.1.2.2 +10 -10
jakarta-jetspeed/src/java/org/apache/jetspeed/test/Attic/TestBasicSecurity.java
Index: TestBasicSecurity.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/test/Attic/TestBasicSecurity.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- TestBasicSecurity.java 26 May 2002 04:08:36 -0000 1.1.2.1
+++ TestBasicSecurity.java 27 May 2002 12:57:11 -0000 1.1.2.2
@@ -83,13 +83,11 @@
import org.apache.jetspeed.om.profile.ProfileLocator;
import org.apache.jetspeed.om.profile.Portlets;
import org.apache.jetspeed.om.profile.PSMLDocument;
-//import org.apache.jetspeed.om.profile.psml.PsmlControl;
import org.apache.jetspeed.om.profile.psml.PsmlController;
import org.apache.jetspeed.om.profile.psml.PsmlEntry;
import org.apache.jetspeed.om.profile.psml.PsmlPortlets;
import org.apache.jetspeed.om.profile.psml.PsmlRole;
import org.apache.jetspeed.om.profile.psml.PsmlSkin;
-//import org.apache.jetspeed.om.profile.psml.PsmlSecurity;
import org.apache.jetspeed.services.Profiler;
import org.apache.jetspeed.services.JetspeedSecurity;
import org.apache.jetspeed.services.rundata.JetspeedRunData;
@@ -102,17 +100,17 @@
import org.apache.turbine.util.RunData;
import org.apache.turbine.util.RunDataFactory;
-// Velocity
-import org.apache.velocity.context.Context;
-
/**
+ * TestBasicSecurity
*
* @author <a href="[EMAIL PROTECTED]">Paul Spencer</a>
- * @version $Id: TestBasicSecurity.java,v 1.1.2.1 2002/05/26 04:08:36 paulsp Exp $
+ * @version $Id: TestBasicSecurity.java,v 1.1.2.2 2002/05/27 12:57:11 paulsp Exp $
*/
public class TestBasicSecurity extends ServletTestCase
{
+ private static String ADMIN_PORTLET = "GlobalAdminPortlet"; // Portlet
accessable by Admin user, role = admin
+ private static String ALL_PORTLET = "HelloVelocity"; // Portlet accessable by
Anonymous user
private static String TEST_ADMIN_PASSWORD ="jetspeed";
private static String TEST_ADMIN_USER = "admin";
private static String TEST_CONTEXT = null;
@@ -122,6 +120,7 @@
private static String TEST_SECURITY_PAGE = "SecurityTest";
private static String TEST_TURBINE_PASSWORD ="turbine";
private static String TEST_TURBINE_USER = "turbine";
+ private static String USER_PORTLET = "SkinBrowser"; // Portlet accessable by
general user, role = user
private RunData rundata = null;
@@ -215,7 +214,7 @@
}
newLocator = new BaseProfileLocator();
- newLocator.setGroupByName("Jetspeed");
+ newLocator.setGroupByName(TEST_GROUP);
newLocator.setMediaType(currentLocator.getMediaType());
newLocator.setName(TEST_SECURITY_PAGE);
@@ -231,9 +230,9 @@
portlets = new PsmlPortlets();
// Add entries
- portlets.addEntry( createEntry("HelloVelocity", "ST_01.all"));
- portlets.addEntry( createEntry("SkinBrowser", "ST_01.user"));
- portlets.addEntry( createEntry("GlobalAdminPortlet", "ST_01.admin"));
+ portlets.addEntry( createEntry(ALL_PORTLET, "ST_01.all"));
+ portlets.addEntry( createEntry(USER_PORTLET, "ST_01.user"));
+ portlets.addEntry( createEntry(ADMIN_PORTLET, "ST_01.admin"));
rootPortletSet.addPortlets(portlets);
Profile newProfile = Profiler.createProfile(newLocator, rootPortletSet);
@@ -417,6 +416,7 @@
System.out.println("text length = " + theResponse.getText().length());
// System.out.println("text length = " + theResponse.getText());
}
+
private PsmlEntry createEntry(java.lang.String parent, java.lang.String id)
{
PsmlEntry entry = new PsmlEntry();
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>