mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-12 20:43:18 +00:00
- Added registration and forgotten password pages.
- Misc other fixes. git-svn-id: http://scm.dspace.org/svn/repo/trunk@242 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -130,6 +130,15 @@
|
||||
<servlet-class>org.dspace.app.webui.servlet.FeedbackServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>forgot</servlet-name>
|
||||
<servlet-class>org.dspace.app.webui.servlet.RegisterServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>register</param-name>
|
||||
<param-value>false</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>items-by-author</servlet-name>
|
||||
<servlet-class>org.dspace.app.webui.servlet.ItemsByAuthorServlet</servlet-class>
|
||||
@@ -160,6 +169,15 @@
|
||||
<servlet-class>org.dspace.app.webui.servlet.EditProfileServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>register</servlet-name>
|
||||
<servlet-class>org.dspace.app.webui.servlet.RegisterServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>register</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>retrieve</servlet-name>
|
||||
<servlet-class>org.dspace.app.webui.servlet.RetrieveServlet</servlet-class>
|
||||
@@ -213,6 +231,11 @@
|
||||
<url-pattern>/feedback</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>forgot</servlet-name>
|
||||
<url-pattern>/forgot</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>items-by-author</servlet-name>
|
||||
<url-pattern>/items-by-author</url-pattern>
|
||||
@@ -243,6 +266,11 @@
|
||||
<url-pattern>/profile</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>register</servlet-name>
|
||||
<url-pattern>/register</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>retrieve</servlet-name>
|
||||
<url-pattern>/retrieve/*</url-pattern>
|
||||
|
62
dspace/jsp/error/require-certificate.jsp
Normal file
62
dspace/jsp/error/require-certificate.jsp
Normal file
@@ -0,0 +1,62 @@
|
||||
<%--
|
||||
- require-certificate.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%--
|
||||
- Message informing MIT user they need to use a certificate to log in
|
||||
- FIXME: MIT-specific message
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<dspace:layout title="Certificate Required">
|
||||
|
||||
<h1>Certificate Required</h1>
|
||||
|
||||
<P>MIT users must log in using a valid MIT Web personal certificate.
|
||||
See the <A HREF="http://web.mit.edu/is/cert/">MIT Information Systems
|
||||
Web certificate information page</A>.</P>
|
||||
|
||||
<P>If you are not an MIT user, or you feel that there are extenuating
|
||||
circumstances that mean you should not be required to use a certificate,
|
||||
please contact us.</P>
|
||||
|
||||
<%@ include file="/components/contact-info.jsp" %>
|
||||
|
||||
</dspace:layout>
|
63
dspace/jsp/register/already-registered.jsp
Normal file
63
dspace/jsp/register/already-registered.jsp
Normal file
@@ -0,0 +1,63 @@
|
||||
<%--
|
||||
- already-registered.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%--
|
||||
- Message informing user who's tried to register that they're registered
|
||||
- already
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<dspace:layout title="Already Registered">
|
||||
|
||||
<h1>Already Registered</h1>
|
||||
|
||||
<P>Our records show that you've already registered with DSpace and have
|
||||
an active account with us.</P>
|
||||
|
||||
<P><strong>If you are not an MIT user</strong> you can
|
||||
<a href="<%= request.getContextPath() %>/forgot"> set a new password if
|
||||
you've forgotten it</A>.</P>
|
||||
|
||||
<P>If you're having trouble logging in, please contact us.</P>
|
||||
|
||||
<%@ include file="/components/contact-info.jsp" %>
|
||||
|
||||
</dspace:layout>
|
@@ -75,7 +75,7 @@
|
||||
<%
|
||||
}
|
||||
|
||||
if( passwordProblem)
|
||||
if (passwordProblem)
|
||||
{
|
||||
%>
|
||||
<P><strong>The passwords you enter below must match, and need to be at
|
||||
|
100
dspace/jsp/register/forgot-password.jsp
Normal file
100
dspace/jsp/register/forgot-password.jsp
Normal file
@@ -0,0 +1,100 @@
|
||||
<%--
|
||||
- forgot-password.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%--
|
||||
- Forgotten password DSpace form
|
||||
-
|
||||
- Form where new users enter their email address to get a token to enter a
|
||||
- new password.
|
||||
-
|
||||
- Attributes to pass in:
|
||||
- retry - if set, this is a retry after the user entered an invalid email
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<%@ page import="org.dspace.app.webui.servlet.RegisterServlet" %>
|
||||
|
||||
<%
|
||||
boolean retry = (request.getAttribute("retry") != null);
|
||||
%>
|
||||
|
||||
<dspace:layout title="Forgotten Password">
|
||||
|
||||
<H1>Forgotten Password</H1>
|
||||
|
||||
<%
|
||||
if (retry)
|
||||
{
|
||||
%>
|
||||
<P><strong>The e-mail address you entered was not recognised. Please
|
||||
try again.</strong></P>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<P>Please enter your e-mail
|
||||
address in the box below and click "I Forgot My Password". You'll be sent
|
||||
an e-mail which will allow you to set a new password.</P>
|
||||
|
||||
<form action="<%= request.getContextPath() %>/forgot" method=POST>
|
||||
<input type=hidden name=step value="<%= RegisterServlet.ENTER_EMAIL_PAGE %>">
|
||||
|
||||
<center>
|
||||
<table class="miscTable">
|
||||
<tr>
|
||||
<td class="oddRowEvenCol">
|
||||
<table border=0 cellpadding=5>
|
||||
<tr>
|
||||
<td class=standard><strong>E-mail Address:</strong></td>
|
||||
<td class=standard><input type=text name="email"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center colspan=2>
|
||||
<input type=submit name=submit value="I Forgot My Password">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</form>
|
||||
|
||||
</dspace:layout>
|
57
dspace/jsp/register/inactive-account.jsp
Normal file
57
dspace/jsp/register/inactive-account.jsp
Normal file
@@ -0,0 +1,57 @@
|
||||
<%--
|
||||
- inactive-account.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%--
|
||||
- Message informing user who said they'd forgot their password that their
|
||||
- account is inactive.
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<dspace:layout title="Inactive Account">
|
||||
<H1>Inactive Account</H1>
|
||||
|
||||
<P>The e-mail address you entered corresponds to an inactive account.
|
||||
Perhaps you haven't yet <A HREF="<%= request.getContextPath() %>/register">
|
||||
registered</A> yet. Please feel free to contact the site administrators
|
||||
with any queries.</P>
|
||||
|
||||
<%@ include file="/components/contact-info.jsp" %>
|
||||
</dspace:layout>
|
83
dspace/jsp/register/invalid-token.jsp
Normal file
83
dspace/jsp/register/invalid-token.jsp
Normal file
@@ -0,0 +1,83 @@
|
||||
<%--
|
||||
- invalid-token.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<%--
|
||||
- Invalid token sent message.
|
||||
--%>
|
||||
|
||||
<dspace:layout title="Invalid Token">
|
||||
|
||||
<H1>Invalid Token</H1>
|
||||
|
||||
<P>The registration or forgotten password "token" in the URL is invalid.
|
||||
This may be because of one of the following reasons:</P>
|
||||
|
||||
<UL>
|
||||
<LI>A token is only valid for around two weeks after we mail it to you.
|
||||
If it's been a while since you selected "Register" or "I forgot my
|
||||
password", you should try again.</LI>
|
||||
|
||||
<LI>The token might be incorrectly copied into the URL. Some e-mail
|
||||
programs will "wrap" long lines of text in an email, so maybe it split
|
||||
your special URL up into two lines, like this:
|
||||
|
||||
<PRE>
|
||||
<%= request.getContextPath() %>/register?token=ABCDEFGHIJK
|
||||
LMNOP
|
||||
</PRE>
|
||||
|
||||
If it has, you should copy and paste the first line into your browser's
|
||||
address bar, then copy the second line, and paste into the address bar
|
||||
just on the end of the first line, making sure there are no spaces. The
|
||||
address bar should then contain something like:
|
||||
|
||||
<PRE>
|
||||
<%= request.getContextPath() %>/register?token=ABCDEFGHIJKLMNOP
|
||||
</PRE>
|
||||
|
||||
Then press return in the address bar, and the URL should work fine.</LI>
|
||||
</UL>
|
||||
|
||||
<P>If you're still having trouble, please contact us.</P>
|
||||
|
||||
<%@ include file="/components/contact-info.jsp" %>
|
||||
</dspace:layout>
|
113
dspace/jsp/register/new-password.jsp
Normal file
113
dspace/jsp/register/new-password.jsp
Normal file
@@ -0,0 +1,113 @@
|
||||
<%--
|
||||
- new-password.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%--
|
||||
- New password form
|
||||
-
|
||||
- Form where users can enter a new password, after having been sent a token
|
||||
- because they forgot the old one.
|
||||
-
|
||||
- Attributes to pass in:
|
||||
- eperson - the eperson
|
||||
- key - the token key associated with this password setting
|
||||
- password.problem - Boolean true if the user has already tried a password
|
||||
- which is for some reason unnacceptible
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<%@ page import="org.dspace.app.webui.servlet.RegisterServlet" %>
|
||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||
|
||||
<%
|
||||
EPerson eperson = (EPerson) request.getAttribute("eperson");
|
||||
String key = (String) request.getAttribute( "key" );
|
||||
Boolean attr = (Boolean) request.getAttribute("password.problem");
|
||||
|
||||
boolean passwordProblem = (attr != null && attr.booleanValue());
|
||||
%>
|
||||
|
||||
<dspace:layout title="Enter New Password">
|
||||
|
||||
<h1>Enter a New Password</H1>
|
||||
|
||||
<P>Hello <%= eperson.getFullName() %>,</P>
|
||||
|
||||
<%
|
||||
if (passwordProblem)
|
||||
{
|
||||
%>
|
||||
<P><strong>The passwords you enter below must match, and need to be at
|
||||
least 6 characters long.</strong></P>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<P>Please enter a new password into the box below, and confirm it by typing it
|
||||
again into the second box. It should be at least six characters long.</P>
|
||||
|
||||
<form action="<%= request.getContextPath() %>/forgot" method=POST>
|
||||
<table class="misc" align="center">
|
||||
<tr>
|
||||
<td class="oddRowEvenCol">
|
||||
<table border=0 cellpadding=5>
|
||||
<tr>
|
||||
<td align=right class=standard><strong>New Password:</strong></td>
|
||||
<td class=standard><input type=password name="password"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=standard><strong>Again to Confirm:</strong></td>
|
||||
<td class=standard><input type=password name="password_confirm"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center colspan=2>
|
||||
<input type=submit name=submit value="Set New Password">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<input type=hidden name=step value="<%= RegisterServlet.NEW_PASSWORD_PAGE %>">
|
||||
<input type=hidden name=key value="<%= key %>">
|
||||
</form>
|
||||
|
||||
</dspace:layout>
|
110
dspace/jsp/register/new-user.jsp
Normal file
110
dspace/jsp/register/new-user.jsp
Normal file
@@ -0,0 +1,110 @@
|
||||
<%--
|
||||
- new-user.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%--
|
||||
- Register with DSpace form
|
||||
-
|
||||
- Form where new users enter their email address to get a token to access
|
||||
- the personal info page.
|
||||
-
|
||||
- Attributes to pass in:
|
||||
- retry - if set, this is a retry after the user entered an invalid email
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<%@ page import="org.dspace.app.webui.servlet.RegisterServlet" %>
|
||||
|
||||
<%
|
||||
boolean retry = (request.getAttribute("retry") != null);
|
||||
%>
|
||||
|
||||
<dspace:layout title="User Registration">
|
||||
|
||||
<H1>User Registration</H1>
|
||||
|
||||
<%
|
||||
if (retry)
|
||||
{
|
||||
%>
|
||||
<P><strong>The e-mail address you entered was not recognised. Please
|
||||
try again.</strong>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<P>If you've never logged on to DSpace before, please enter your e-mail
|
||||
address in the box below and click "Register".
|
||||
<%
|
||||
}
|
||||
%> Note that currently, the
|
||||
DSpace service is only available to users who have been already registered
|
||||
to use the DSpace system by their group, department, or laboratory.</P>
|
||||
|
||||
<form action="<%= request.getContextPath() %>/register" method=POST>
|
||||
|
||||
<input type=hidden name=step value="<%= RegisterServlet.ENTER_EMAIL_PAGE %>">
|
||||
|
||||
<table class="miscTable" align="center">
|
||||
<tr>
|
||||
<td class="oddRowEvenCol">
|
||||
<table border=0 cellpadding=5>
|
||||
<tr>
|
||||
<td class=standard><strong>E-mail Address:</strong></td>
|
||||
<td class=standard><input type=text name="email"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center colspan=2>
|
||||
<input type=submit name=submit value="Register">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<P>If you or your department are interested in registering with DSpace, please
|
||||
contact the DSpace site administrators.</P>
|
||||
|
||||
<%@ include file="/components/contact-info.jsp" %>
|
||||
|
||||
</dspace:layout>
|
56
dspace/jsp/register/password-changed.jsp
Normal file
56
dspace/jsp/register/password-changed.jsp
Normal file
@@ -0,0 +1,56 @@
|
||||
<%--
|
||||
- password-token-sent.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%--
|
||||
- Password changed message
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<dspace:layout title="Password Changed">
|
||||
|
||||
<H1>Password Changed</H1>
|
||||
|
||||
<P>Thank you, your new password has been set and is active immediately.</P>
|
||||
|
||||
<P><A HREF="<%= request.getContextPath() %>/">Go to DSpace Home</A></P>
|
||||
|
||||
</dspace:layout>
|
||||
|
55
dspace/jsp/register/password-token-sent.jsp
Normal file
55
dspace/jsp/register/password-token-sent.jsp
Normal file
@@ -0,0 +1,55 @@
|
||||
<%--
|
||||
- password-token-sent.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%--
|
||||
- Forgot password token sent message.
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<dspace:layout title="New Password E-mail Sent">
|
||||
|
||||
<H1>New Password E-mail Sent</H1>
|
||||
|
||||
<P>You have been sent an e-mail containing a special URL. When you visit
|
||||
this URL, you will be able to set a new password to carry on using DSpace.</P>
|
||||
|
||||
</dspace:layout>
|
||||
|
70
dspace/jsp/register/registered.jsp
Normal file
70
dspace/jsp/register/registered.jsp
Normal file
@@ -0,0 +1,70 @@
|
||||
<%--
|
||||
- registered.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%--
|
||||
- Registered OK message
|
||||
-
|
||||
- Displays a message indicating that the user has registered OK.
|
||||
-
|
||||
- Attributes to pass in:
|
||||
- eperson - eperson who's just registered
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<%@ page import="org.dspace.app.webui.servlet.RegisterServlet" %>
|
||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||
|
||||
<%
|
||||
EPerson eperson = (EPerson) request.getAttribute("eperson");
|
||||
%>
|
||||
|
||||
<dspace:layout title="Registration Complete">
|
||||
|
||||
<H1>Registration Complete</H1>
|
||||
|
||||
<P>Thank you <%= eperson.getFirstName() %>,</P>
|
||||
|
||||
<P>You're now registered to use the DSpace system. You can log into the
|
||||
system, view areas of the site reserved for registered users, and start
|
||||
submitting your work.</P>
|
||||
|
||||
<P><A HREF="<%= request.getContextPath() %>/">Return to DSpace Home</A></P>
|
||||
</dspace:layout>
|
134
dspace/jsp/register/registration-form.jsp
Normal file
134
dspace/jsp/register/registration-form.jsp
Normal file
@@ -0,0 +1,134 @@
|
||||
<%--
|
||||
- registration-form.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%--
|
||||
- Registration information form
|
||||
-
|
||||
- Form where new users enter their personal information and select a
|
||||
- password.
|
||||
-
|
||||
- Attributes to pass in:
|
||||
-
|
||||
- eperson - the EPerson who's registering
|
||||
- key - the token key they've been given for registering
|
||||
- missing.fields - if a Boolean true, the user hasn't entered enough
|
||||
- information on the form during a previous attempt
|
||||
- password.problem - if a Boolean true, there's a problem with password
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<%@ page import="org.dspace.app.webui.servlet.RegisterServlet" %>
|
||||
<%@ page import="org.dspace.eperson.EPerson" %>
|
||||
|
||||
<%
|
||||
EPerson eperson = (EPerson) request.getAttribute( "eperson" );
|
||||
String key = (String) request.getAttribute( "key" );
|
||||
|
||||
Boolean attr = (Boolean) request.getAttribute("missing.fields");
|
||||
boolean missingFields = (attr != null && attr.booleanValue());
|
||||
|
||||
attr = (Boolean) request.getAttribute("password.problem");
|
||||
boolean passwordProblem = (attr != null && attr.booleanValue());
|
||||
%>
|
||||
|
||||
<dspace:layout title="Registration Information">
|
||||
|
||||
<H1>Registration Information</H1>
|
||||
|
||||
<%
|
||||
if (missingFields)
|
||||
{
|
||||
%>
|
||||
<P><strong>Please fill out all of the required fields.</strong></P>
|
||||
<%
|
||||
}
|
||||
|
||||
if( passwordProblem)
|
||||
{
|
||||
%>
|
||||
<P><strong>The passwords you enter below must match, and need to be at
|
||||
least 6 characters long.</strong></P>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<P>Please enter the following information. The fields marked with a * are
|
||||
required.</P>
|
||||
|
||||
<form action="<%= request.getContextPath() %>/register" method=POST>
|
||||
|
||||
<%@ include file="/register/profile-form.jsp" %>
|
||||
|
||||
<%
|
||||
// Only show password update section if the user doesn't use
|
||||
// certificates
|
||||
if (eperson.getRequireCertificate() == false)
|
||||
{
|
||||
%>
|
||||
<P>Please choose a password and enter it into the box below, and confirm it by typing it
|
||||
again into the second box. It should be at least six characters long.</P>
|
||||
|
||||
<table class="misc" align="center">
|
||||
<tr>
|
||||
<td class="oddRowEvenCol">
|
||||
<table border=0 cellpadding=5>
|
||||
<tr>
|
||||
<td align=right class=standard><strong>Password:</strong></td>
|
||||
<td class=standard><input type=password name="password"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=right class=standard><strong>Again to Confirm:</strong></td>
|
||||
<td class=standard><input type=password name="password_confirm"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
<input type=hidden name=step value="<%= RegisterServlet.PERSONAL_INFO_PAGE %>">
|
||||
<input type=hidden name=key value="<%= key %>">
|
||||
|
||||
<P align=center><input type=submit name=submit value="Complete Registration"></P>
|
||||
</form>
|
||||
</dspace:layout>
|
55
dspace/jsp/register/registration-sent.jsp
Normal file
55
dspace/jsp/register/registration-sent.jsp
Normal file
@@ -0,0 +1,55 @@
|
||||
<%--
|
||||
- inactive-account.jsp
|
||||
-
|
||||
- Version: $Revision$
|
||||
-
|
||||
- Date: $Date$
|
||||
-
|
||||
- Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
- Institute of Technology. All rights reserved.
|
||||
-
|
||||
- Redistribution and use in source and binary forms, with or without
|
||||
- modification, are permitted provided that the following conditions are
|
||||
- met:
|
||||
-
|
||||
- - Redistributions of source code must retain the above copyright
|
||||
- notice, this list of conditions and the following disclaimer.
|
||||
-
|
||||
- - 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.
|
||||
-
|
||||
- - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
- Massachusetts Institute of Technology nor the names of their
|
||||
- contributors may be used to endorse or promote products derived from
|
||||
- this software without specific prior written permission.
|
||||
-
|
||||
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
- ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
- HOLDERS OR 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.
|
||||
--%>
|
||||
|
||||
<%--
|
||||
- Registration token sent message.
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %>
|
||||
|
||||
<dspace:layout title="Registration E-mail Sent">
|
||||
|
||||
<H1>Registration E-mail Sent</H1>
|
||||
|
||||
<P>You have been sent an e-mail containing a special URL, or "token". When
|
||||
you visit this URL, you will need to fill out some simple information.
|
||||
After that, you'll be ready to submit your work to DSpace!</P>
|
||||
|
||||
</dspace:layout>
|
@@ -102,7 +102,7 @@ public class PasswordServlet extends DSpaceServlet
|
||||
// they must use a certificate
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/login/require-certificate.jsp");
|
||||
"/error/require-certificate.jsp");
|
||||
return;
|
||||
}
|
||||
else if (eperson.checkPassword(password))
|
||||
|
481
dspace/src/org/dspace/app/webui/servlet/RegisterServlet.java
Normal file
481
dspace/src/org/dspace/app/webui/servlet/RegisterServlet.java
Normal file
@@ -0,0 +1,481 @@
|
||||
/*
|
||||
* RegisterServlet.java
|
||||
*
|
||||
* Version: $Revision$
|
||||
*
|
||||
* Date: $Date$
|
||||
*
|
||||
* Copyright (c) 2001, Hewlett-Packard Company and Massachusetts
|
||||
* Institute of Technology. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - 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.
|
||||
*
|
||||
* - Neither the name of the Hewlett-Packard Company nor the name of the
|
||||
* Massachusetts Institute of Technology nor the names of their
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT
|
||||
* HOLDERS OR 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.
|
||||
*/
|
||||
|
||||
package org.dspace.app.webui.servlet;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.SQLException;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.dspace.app.webui.util.JSPManager;
|
||||
import org.dspace.app.webui.util.UIUtil;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.core.LogManager;
|
||||
import org.dspace.eperson.AccountManager;
|
||||
import org.dspace.eperson.EPerson;
|
||||
|
||||
|
||||
/**
|
||||
* Servlet for handling user registration and forgotten passwords.
|
||||
* <P>
|
||||
* This servlet handles both forgotten passwords and initial registration of
|
||||
* users. Which it handles depends on the initialisation parameter
|
||||
* "register" - if it's "true", it is treated as an initial registration
|
||||
* and the user is asked to input their personal information.
|
||||
* <P>
|
||||
* The sequence of events is this: The user clicks on "register" or "I forgot
|
||||
* my password." This servlet then displays the relevant "enter your e-mail"
|
||||
* form. An e-mail address is POSTed back, and if this is valid, a token
|
||||
* is created and e-mailed, otherwise an error is displayed, with another
|
||||
* "enter your e-mail" form.
|
||||
* <P>
|
||||
* When the user clicks on the token URL mailed to them, this servlet receives
|
||||
* a GET with the token as the parameter "KEY". If this is a valid token,
|
||||
* the servlet then displays the "edit profile" or "edit password" screen
|
||||
* as appropriate.
|
||||
*/
|
||||
public class RegisterServlet extends DSpaceServlet
|
||||
{
|
||||
|
||||
/** Logger */
|
||||
private static Logger log = Logger.getLogger(RegisterServlet.class);
|
||||
|
||||
/** The "enter e-mail" step */
|
||||
public static final int ENTER_EMAIL_PAGE = 1;
|
||||
|
||||
/** The "enter personal info" page */
|
||||
public static final int PERSONAL_INFO_PAGE = 2;
|
||||
|
||||
/** The simple "enter new password" page */
|
||||
public static final int NEW_PASSWORD_PAGE = 3;
|
||||
|
||||
/** true = registering users, false = forgotten passwords */
|
||||
private boolean registering;
|
||||
|
||||
|
||||
public void init()
|
||||
{
|
||||
registering = getInitParameter("register").equalsIgnoreCase("true");
|
||||
}
|
||||
|
||||
|
||||
protected void doDSGet(Context context,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response)
|
||||
throws ServletException, IOException, SQLException, AuthorizeException
|
||||
{
|
||||
/* Respond to GETs. A simple GET with no parameters will display
|
||||
* the relevant "type in your e-mail" form. A GET with a "key"
|
||||
* parameter will go to the "enter personal info" or "enter new
|
||||
* password" page as appropriate.
|
||||
*/
|
||||
|
||||
// Get the key
|
||||
String key = request.getParameter("token");
|
||||
|
||||
if (key == null)
|
||||
{
|
||||
// Simple "enter your e-mail" page
|
||||
if (registering)
|
||||
{
|
||||
// Registering a new user
|
||||
JSPManager.showJSP(request, response, "/register/new-user.jsp");
|
||||
}
|
||||
else
|
||||
{
|
||||
// User forgot their password
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/forgot-password.jsp");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Find out who the key is for
|
||||
EPerson eperson = AccountManager.getEPerson(context, key);
|
||||
|
||||
/* Display an error if it's:
|
||||
* An invalid token
|
||||
* An active eperson is trying to register
|
||||
* An active eperson who needs to use certs is trying to set a p/w
|
||||
* An inactive (unregistered) eperson is trying to set a new p/w
|
||||
*/
|
||||
if (eperson == null ||
|
||||
(eperson.getActive() && registering) ||
|
||||
(eperson.getActive() && eperson.getRequireCertificate() && registering) ||
|
||||
(!registering && !eperson.getActive()))
|
||||
{
|
||||
// Invalid token
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/invalid-token.jsp");
|
||||
return;
|
||||
}
|
||||
|
||||
// Both forms need an EPerson object
|
||||
request.setAttribute("eperson", eperson);
|
||||
|
||||
// And the token
|
||||
request.setAttribute("key", key);
|
||||
|
||||
// Put up the relevant form
|
||||
if (registering)
|
||||
{
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/registration-form.jsp");
|
||||
}
|
||||
else
|
||||
{
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/new-password.jsp");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void doDSPost(Context context,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response)
|
||||
throws ServletException, IOException, SQLException, AuthorizeException
|
||||
{
|
||||
/*
|
||||
* POSTs are the result of entering an e-mail in the
|
||||
* "forgot my password" or "new user" forms, or the "enter profile
|
||||
* information" or "enter new password" forms.
|
||||
*/
|
||||
|
||||
// First get the step
|
||||
int step = UIUtil.getIntParameter(request, "step");
|
||||
|
||||
switch (step)
|
||||
{
|
||||
case ENTER_EMAIL_PAGE:
|
||||
processEnterEmail(context, request, response);
|
||||
break;
|
||||
|
||||
case PERSONAL_INFO_PAGE:
|
||||
processPersonalInfo(context, request, response);
|
||||
break;
|
||||
|
||||
case NEW_PASSWORD_PAGE:
|
||||
processNewPassword(context, request, response);
|
||||
break;
|
||||
|
||||
default:
|
||||
log.warn(LogManager.getHeader(context,
|
||||
"integrity_error",
|
||||
UIUtil.getRequestLogInfo(request)));
|
||||
JSPManager.showIntegrityError(request, response);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process information from the "enter e-mail" page. If the e-mail
|
||||
* corresponds to a valid user of the system, a token is generated
|
||||
* and sent to that user.
|
||||
*
|
||||
* @param context current DSpace context
|
||||
* @param request current servlet request object
|
||||
* @param response current servlet response object
|
||||
*/
|
||||
private void processEnterEmail(Context context,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response)
|
||||
throws ServletException, IOException, SQLException, AuthorizeException
|
||||
{
|
||||
String email = request.getParameter("email");
|
||||
|
||||
EPerson eperson = EPerson.findByEmail(context, email);
|
||||
|
||||
if (eperson != null)
|
||||
{
|
||||
// Can't register an already active user
|
||||
if (eperson.getActive() && registering)
|
||||
{
|
||||
log.info(LogManager.getHeader(context,
|
||||
"already_registered",
|
||||
"email=" + email));
|
||||
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/already-registered.jsp");
|
||||
return;
|
||||
}
|
||||
|
||||
// Can't give new password to inactive user
|
||||
if (!eperson.getActive() && !registering)
|
||||
{
|
||||
log.info(LogManager.getHeader(context,
|
||||
"unregistered_forgot_password",
|
||||
"email=" + email));
|
||||
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/inactive-account.jsp");
|
||||
return;
|
||||
}
|
||||
|
||||
// User that requires certificate can't get password
|
||||
if (eperson.getRequireCertificate() && !registering)
|
||||
{
|
||||
log.info(LogManager.getHeader(context,
|
||||
"certificate_user_forgot_password",
|
||||
"email=" + email));
|
||||
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/error/require-certificate.jsp");
|
||||
return;
|
||||
}
|
||||
|
||||
// Now send info.
|
||||
try
|
||||
{
|
||||
if (registering)
|
||||
{
|
||||
log.info(LogManager.getHeader(context,
|
||||
"sendtoken_register",
|
||||
"email=" + email));
|
||||
|
||||
AccountManager.sendRegistrationInfo(context, email);
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/registration-sent.jsp");
|
||||
}
|
||||
else
|
||||
{
|
||||
log.info(LogManager.getHeader(context,
|
||||
"sendtoken_forgotpw",
|
||||
"email=" + email));
|
||||
|
||||
AccountManager.sendForgotPasswordInfo(context, email);
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/password-token-sent.jsp");
|
||||
}
|
||||
|
||||
// Context needs completing to write registration data
|
||||
context.complete();
|
||||
}
|
||||
catch (MessagingException me)
|
||||
{
|
||||
log.info(LogManager.getHeader(context,
|
||||
"error_emailing",
|
||||
"email=" + email),
|
||||
me);
|
||||
|
||||
JSPManager.showInternalError(request, response);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
log.info(LogManager.getHeader(context,
|
||||
"unknown_email",
|
||||
"email=" + email));
|
||||
|
||||
request.setAttribute("retry", new Boolean(true));
|
||||
|
||||
if (registering)
|
||||
{
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/new-user.jsp");
|
||||
}
|
||||
else
|
||||
{
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/forgot-password.jsp");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process information from "Personal information page"
|
||||
*
|
||||
* @param context current DSpace context
|
||||
* @param request current servlet request object
|
||||
* @param response current servlet response object
|
||||
*/
|
||||
private void processPersonalInfo(Context context,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response)
|
||||
throws ServletException, IOException, SQLException, AuthorizeException
|
||||
{
|
||||
// Get the key
|
||||
String key = request.getParameter("key");
|
||||
|
||||
// Get the eperson associated with the registration
|
||||
EPerson eperson = AccountManager.getEPerson(context, key);
|
||||
|
||||
// If the token isn't valid, show an error
|
||||
if (eperson == null)
|
||||
{
|
||||
log.info(LogManager.getHeader(context,
|
||||
"invalid_token",
|
||||
"token=" + key));
|
||||
|
||||
// Invalid token
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/invalid-token.jsp");
|
||||
return;
|
||||
}
|
||||
|
||||
// Set the user profile info
|
||||
boolean infoOK = EditProfileServlet.updateUserProfile(eperson, request);
|
||||
|
||||
boolean passwordOK = true;
|
||||
|
||||
if (eperson.getRequireCertificate() == false)
|
||||
{
|
||||
passwordOK = EditProfileServlet.confirmAndSetPassword(eperson,
|
||||
request);
|
||||
}
|
||||
|
||||
if (!infoOK)
|
||||
{
|
||||
request.setAttribute("missing.fields", new Boolean(true));
|
||||
}
|
||||
|
||||
if (!passwordOK)
|
||||
{
|
||||
request.setAttribute("password.problem", new Boolean(true));
|
||||
}
|
||||
|
||||
request.setAttribute("eperson", eperson);
|
||||
|
||||
// Forward to appropriate page
|
||||
if (infoOK && passwordOK)
|
||||
{
|
||||
log.info(LogManager.getHeader(context,
|
||||
"usedtoken_register",
|
||||
"email=" + eperson.getEmail()));
|
||||
|
||||
// delete the token
|
||||
AccountManager.deleteToken(context, key);
|
||||
|
||||
// Set the user as active and update
|
||||
eperson.setActive(true);
|
||||
eperson.update();
|
||||
|
||||
JSPManager.showJSP(request, response, "/register/registered.jsp");
|
||||
context.complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
request.setAttribute("key", key);
|
||||
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/registration-form.jsp");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Process information from "enter new password"
|
||||
*
|
||||
* @param context current DSpace context
|
||||
* @param request current servlet request object
|
||||
* @param response current servlet response object
|
||||
*/
|
||||
private void processNewPassword(Context context,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response)
|
||||
throws ServletException, IOException, SQLException, AuthorizeException
|
||||
{
|
||||
// Get the key
|
||||
String key = request.getParameter("key");
|
||||
|
||||
// Get the eperson associated with the password change
|
||||
EPerson eperson = AccountManager.getEPerson(context, key);
|
||||
|
||||
// If the token isn't valid, show an error
|
||||
if (eperson == null)
|
||||
{
|
||||
log.info(LogManager.getHeader(context,
|
||||
"invalid_token",
|
||||
"token=" + key));
|
||||
|
||||
// Invalid token
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/invalid-token.jsp");
|
||||
return;
|
||||
}
|
||||
|
||||
// Confirm and set the password
|
||||
boolean passwordOK = EditProfileServlet.confirmAndSetPassword(
|
||||
eperson, request);
|
||||
|
||||
if (passwordOK)
|
||||
{
|
||||
log.info(LogManager.getHeader(context,
|
||||
"usedtoken_forgotpw",
|
||||
"email=" + eperson.getEmail()));
|
||||
|
||||
AccountManager.deleteToken(context, key);
|
||||
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/password-changed.jsp");
|
||||
context.complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
request.setAttribute("password.problem", new Boolean(true));
|
||||
request.setAttribute("key", key);
|
||||
|
||||
JSPManager.showJSP(request,
|
||||
response,
|
||||
"/register/new-password.jsp");
|
||||
}
|
||||
}
|
||||
}
|
@@ -129,7 +129,7 @@ public class X509CertificateServlet extends DSpaceServlet
|
||||
EPerson eperson = X509Manager.getUser(context, certs[0]);
|
||||
|
||||
// Do we have an e-person?
|
||||
if (eperson != null)
|
||||
if (eperson != null && eperson.getActive())
|
||||
{
|
||||
// Everything OK - log them in.
|
||||
Authenticate.loggedIn(context, request, eperson);
|
||||
|
@@ -220,7 +220,7 @@ public class AccountManager
|
||||
// So FIRST leave some breadcrumbs
|
||||
if (log.isDebugEnabled())
|
||||
log.debug("Created callback " +
|
||||
rd.getIntColumn("id") +
|
||||
rd.getIntColumn("registrationdata_id") +
|
||||
" with token " + rd.getStringColumn("token") +
|
||||
" for eperson " + ep.getID() +
|
||||
" with email \"" + email + "\"");
|
||||
@@ -250,7 +250,7 @@ public class AccountManager
|
||||
TableRow rd)
|
||||
throws MessagingException, IOException
|
||||
{
|
||||
String base = ConfigurationManager.getProperty("url.base");
|
||||
String base = ConfigurationManager.getProperty("dspace.url");
|
||||
|
||||
// Note change from "key=" to "token="
|
||||
String specialLink = new StringBuffer()
|
||||
|
Reference in New Issue
Block a user