Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 949 → Rev 946

/sun/hostadmiral/trunk/webapp/deleting.jsp
File deleted
/sun/hostadmiral/trunk/webapp/WEB-INF/struts-config.xml
28,12 → 28,6
</form-bean>
 
<form-bean
name="ak.hostadmiral.core.form.UserLoginsForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="id" type="java.lang.String" />
</form-bean>
 
<form-bean
name="ak.hostadmiral.core.form.UserEditForm"
type="ak.hostadmiral.core.form.UserPasswordForm">
<form-property name="id" type="java.lang.String" />
197,23 → 191,6
</action>
 
<action
path="/user/logins"
type="ak.hostadmiral.core.action.UserLoginsAction"
name="ak.hostadmiral.core.form.UserLoginsForm"
validate="true"
scope="request"
>
<forward name="default" path="/user/logins.jsp" />
</action>
 
<action
path="/user/failedLogins"
type="ak.hostadmiral.core.action.FailedLoginsAction"
>
<forward name="default" path="/user/failedLogins.jsp" />
</action>
 
<action
path="/user/list"
type="ak.hostadmiral.core.action.UserAction"
parameter="list"
/sun/hostadmiral/trunk/webapp/WEB-INF/validation.xml
32,20 → 32,13
 
<form name="ak.hostadmiral.core.form.UserForm">
<field property="id" depends="long">
<msg name="long" key="ak.hostadmiral.core.user.id.wrong" />
<msg name="long" key="ak.hostadmiral.core.user.password.change.id.wrong" />
</field>
</form>
 
<form name="ak.hostadmiral.core.form.UserLoginsForm">
<field property="id" depends="required,long">
<msg name="required" key="ak.hostadmiral.core.user.id.wrong" />
<msg name="long" key="ak.hostadmiral.core.user.id.wrong" />
</field>
</form>
 
<form name="ak.hostadmiral.core.form.UserEditForm">
<field property="id" depends="long">
<msg name="long" key="ak.hostadmiral.core.user.id.wrong" />
<msg name="long" key="ak.hostadmiral.core.user.password.change.id.wrong" />
</field>
<field property="login" depends="required">
<msg name="required" key="ak.hostadmiral.core.login.required" />
/sun/hostadmiral/trunk/webapp/WEB-INF/web.xml
7,10 → 7,6
<web-app>
 
<filter>
<filter-name>Profiler Filter</filter-name>
<filter-class>ak.hostadmiral.core.servlet.ProfilerFilter</filter-class>
</filter>
<filter>
<filter-name>Encoding Filter</filter-name>
<filter-class>ak.hostadmiral.core.servlet.EncodingFilter</filter-class>
</filter>
43,10 → 39,6
</filter>
 
<filter-mapping>
<filter-name>Profiler Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Encoding Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
/sun/hostadmiral/trunk/webapp/WEB-INF/.cvsignore
0,0 → 1,0
classes
/sun/hostadmiral/trunk/webapp/user/logins.jsp
File deleted
/sun/hostadmiral/trunk/webapp/user/failedLogins.jsp
File deleted
/sun/hostadmiral/trunk/webapp/user/view.jsp
66,10 → 66,6
</tr>
</table>
 
<p>
<backpath:link action="/user/logins" paramId="id" paramName="u" paramProperty="id"><bean:message key="ak.hostadmiral.page.user.view.logins" /></backpath:link>
</p>
 
</body>
 
</html>
/sun/hostadmiral/trunk/webapp/user/list.jsp
61,7 → 61,7
</td>
<td>
<core:deleteable name="u">
<backpath:link action="/user/deleting" paramId="id" paramName="u" paramProperty="id"><bean:message key="ak.hostadmiral.page.user.list.delete" /></backpath:link>
<backpath:link action="/user/delete" paramId="id" paramName="u" paramProperty="id"><bean:message key="ak.hostadmiral.page.user.list.delete" /></backpath:link>
</core:deleteable>
<core:notDeleteable name="u">
&nbsp;
73,8 → 73,6
 
<backpath:link action="/user/edit"><bean:message key="ak.hostadmiral.page.user.list.add" /></backpath:link>
<br>
<backpath:link action="/user/failedLogins"><bean:message key="ak.hostadmiral.page.user.list.logins.failed" /></backpath:link>
<br>
<backpath:backlink><bean:message key="ak.hostadmiral.page.user.list.back" /></backpath:backlink>
 
</body>
/sun/hostadmiral/trunk/webapp/user/edit.jsp
77,10 → 77,6
 
</html:form>
 
<p>
<backpath:link action="/user/logins" paramId="id" paramName="u" paramProperty="id"><bean:message key="ak.hostadmiral.page.user.edit.logins" /></backpath:link>
</p>
 
</body>
 
</html>
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/action/FailedLoginsAction.java
File deleted
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/action/UserLoginsAction.java
File deleted
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/action/UserAction.java
3,7 → 3,6
import java.util.List;
import java.util.Collections;
import java.util.ArrayList;
import java.util.HashSet;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
107,8 → 106,7
 
request.setAttribute("action", "/user/delete.do");
request.setAttribute("object", u);
request.setAttribute("cascade",
UserManager.getInstance().beforeDelete(user, u, new HashSet()));
request.setAttribute("cascade", UserManager.getInstance().beforeDelete(user, u));
 
return mapping.findForward("default");
}
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/action/LoginAction.java
28,7 → 28,7
DynaActionForm theForm = (DynaActionForm)form;
 
User user = UserManager.getInstance().loginUser(
(String)theForm.get("login"), (String)theForm.get("password"), request.getRemoteAddr());
(String)theForm.get("login"), (String)theForm.get("password"));
 
if(user == null) {
ActionErrors errors = new ActionErrors();
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/UserLogin.java
File deleted
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/InetDomainBeforeDeleteListener.java
File deleted
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/SystemUserBeforeDeleteListener.java
File deleted
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/MailAliasBeforeDeleteListener.java
File deleted
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/MailboxBeforeDeleteListener.java
File deleted
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/UserManager.java
27,8 → 27,6
try {
HibernateUtil.getConfiguration().addResource(
"/ak/hostadmiral/core/model/User.hbm.xml");
HibernateUtil.getConfiguration().addResource(
"/ak/hostadmiral/core/model/UserLogin.hbm.xml");
 
userManager = new UserManager();
}
110,9 → 108,7
{
try {
List list = HibernateUtil.currentSession().find(
"from User where login = ? and enabled = ?",
new Object[] { login, new Boolean(true) },
new Type[] { Hibernate.STRING, Hibernate.BOOLEAN } );
"from User where login=? and enabled='1'", login, Hibernate.STRING);
 
if(list.size() == 0)
return null;
155,7 → 151,7
beforeDeleteListeners.remove(listener);
}
 
public Collection beforeDelete(User editor, User user, Collection known)
public Collection beforeDelete(User editor, User user)
throws ModelException
{
Collection cascade = new ArrayList();
162,7 → 158,7
 
for(Iterator i = beforeDeleteListeners.iterator(); i.hasNext(); ) {
UserBeforeDeleteListener listener = (UserBeforeDeleteListener)i.next();
Collection subcascade = listener.userBeforeDelete(editor, user, known);
Collection subcascade = listener.userBeforeDelete(editor, user);
if(subcascade != null)
cascade.addAll(subcascade);
}
226,50 → 222,26
}
}
 
public User loginUser(String login, String password, String ip)
public User loginUser(String login, String password)
throws ModelException
{
User user = (login == null || password == null) ? null : findForLogin(login);
boolean success = (user == null) ? false : user.checkPassword(password);
UserLogin userLogin = new UserLogin(user, login, new Date(), new Boolean(success), ip);
if(login == null || password == null)
return null;
 
// save login information
try {
HibernateUtil.currentSession().saveOrUpdate(userLogin);
User user = findForLogin(login);
 
if(user != null) {
if(user.checkPassword(password))
return user;
}
catch(HibernateException ex)
{
throw new ModelException(ex);
}
 
if(success)
return user;
else
return null; // wrong login or password
// wrong login or password
return null;
}
 
public Collection listFailedLogins(User editor)
public Collection userBeforeDelete(User editor, User user)
throws ModelException
{
if(!editor.mayViewAllLogins())
{
throw new ModelSecurityException();
}
 
try {
return HibernateUtil.currentSession().find(
"from UserLogin where success = ?",
new Boolean(false), Hibernate.BOOLEAN);
}
catch(HibernateException ex)
{
throw new ModelException(ex);
}
}
 
public Collection userBeforeDelete(User editor, User user, Collection known)
throws ModelException
{
Collection subusers;
 
try {
288,7 → 260,7
if(u.viewableBy(editor)) {
if(u.deleteableBy(editor))
cascade.add(new CascadeDeleteElement(u, CascadeDeleteElement.DELETE,
this.beforeDelete(editor, u, known)));
this.beforeDelete(editor, u)));
else
cascade.add(new CascadeDeleteElement(u, CascadeDeleteElement.FORBIDDEN, null));
}
302,7 → 274,6
}
 
public static final Comparator LOGIN_COMPARATOR = new LoginComparator();
public static final Comparator LOGINS_TIME_COMPARATOR = new LoginsTimeComparator();
 
private static class LoginComparator
implements Comparator
330,31 → 301,4
return (obj instanceof LoginComparator);
}
}
 
private static class LoginsTimeComparator
implements Comparator
{
public int compare(Object o1, Object o2)
{
if(!(o1 instanceof UserLogin) || !(o2 instanceof UserLogin))
throw new ClassCastException("not a UserLogin");
 
UserLogin a1 = (UserLogin)o1;
UserLogin a2 = (UserLogin)o2;
 
if(a1 == null && a2 == null)
return 0;
else if(a1 == null && a2 != null)
return -1;
else if(a1 != null && a2 == null)
return 1;
else
return a1.getLoginTime().compareTo(a2.getLoginTime());
}
 
public boolean equals(Object obj)
{
return (obj instanceof LoginComparator);
}
}
}
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/User.java
1,8 → 1,5
package ak.hostadmiral.core.model;
 
import java.util.Collection;
import java.util.Collections;
 
import ak.hostadmiral.util.Digest;
import ak.hostadmiral.util.ModelException;
import ak.hostadmiral.util.ModelSecurityException;
14,11 → 11,10
public class User
extends GeneralModelObject
{
private String login;
private String password;
private User boss;
private Boolean superuser;
private Collection loginHistory;
private String login;
private String password;
private User boss;
private Boolean superuser;
 
protected User()
{
137,27 → 133,6
this.superuser = superuser;
}
 
/**
*
* @hibernate.set lazy="true"
* @hibernate.collection-key column="usr"
* @hibernate.collection-one-to-many class="ak.hostadmiral.core.model.UserLogin"
*/
protected Collection getLoginHistory()
{
return loginHistory;
}
 
public Collection getLogins()
{
return Collections.unmodifiableCollection(loginHistory);
}
 
protected void setLoginHistory(Collection loginHistory)
{
this.loginHistory = loginHistory;
}
 
public boolean equals(Object o)
{
if(o == null || !(o instanceof User)) return false;
214,11 → 189,6
return user.isSuperuser() && !user.equals(this);
}
 
public boolean mayViewAllLogins()
{
return isSuperuser();
}
 
protected static boolean allowedToCreate(UserManager manager, User editor)
throws ModelException
{
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/InetDomainManager.java
15,6 → 15,9
 
public static InetDomainManager getInstance()
{
if(inetDomainManager == null)
inetDomainManager = new InetDomainManager();
 
return inetDomainManager;
}
 
41,8 → 44,6
register();
}
 
private Collection beforeDeleteListeners = new ArrayList();
 
private InetDomainManager()
{
UserManager.getInstance().addBeforeDeleteListener(this);
139,28 → 140,18
}
}
 
public void addBeforeDeleteListener(SystemUserBeforeDeleteListener listener)
{
beforeDeleteListeners.add(listener);
}
 
public void removeBeforeDeleteListener(SystemUserBeforeDeleteListener listener)
{
beforeDeleteListeners.remove(listener);
}
 
public Collection beforeDelete(User editor, InetDomain domain, Collection known)
public Collection beforeDelete(User editor, InetDomain domain)
throws ModelException
{
Collection cascade = new ArrayList();
 
/*
for(Iterator i = beforeDeleteListeners.iterator(); i.hasNext(); ) {
InetDomainBeforeDeleteListener listener = (InetDomainBeforeDeleteListener)i.next();
Collection subcascade = listener.inetDomainBeforeDelete(editor, domain, known);
Collection subcascade = listener.userBeforeDelete(editor, domain);
if(subcascade != null)
cascade.addAll(subcascade);
}
 
*/
return cascade;
}
 
213,7 → 204,7
}
}
 
public Collection userBeforeDelete(User editor, User user, Collection known)
public Collection userBeforeDelete(User editor, User user)
throws ModelException
{
Collection domains;
221,7 → 212,7
try {
domains = HibernateUtil.currentSession().find(
"from InetDomain where owner = ?",
user, Hibernate.entity(User.class) );
user, Hibernate.entity(InetDomain.class) );
}
catch(HibernateException ex)
{
234,7 → 225,7
if(d.viewableBy(editor)) {
if(d.deleteableBy(editor))
cascade.add(new CascadeDeleteElement(d, CascadeDeleteElement.DELETE,
this.beforeDelete(editor, d, known)));
this.beforeDelete(editor, d)));
else
cascade.add(new CascadeDeleteElement(d, CascadeDeleteElement.FORBIDDEN, null));
}
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/UserBeforeDeleteListener.java
10,11 → 10,9
*
* @param editor who is doing the operation
* @param user the user to delete
* @param known Collection(Object) - already known objects which are touched by current operation,
* to avoid loops
* @return Collection(CascadeDeleteElement) - object which are touched by deleting the user
* FIXME: limit deep of load?
*/
public Collection userBeforeDelete(User editor, User user, Collection known)
public Collection userBeforeDelete(User editor, User user)
throws ModelException;
}
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/SystemUser.java
123,12 → 123,4
{
return editor.isSuperuser();
}
 
protected static SystemUser createLimitedCopy(SystemUser origin)
{
SystemUser u = new SystemUser();
u.setUid(origin.getUid());
u.setName(origin.getName());
return u;
}
}
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/Mailbox.java
220,12 → 220,5
return editor.isSuperuser()
|| InetDomainManager.getInstance().areInetDomainsAvailable(editor);
}
}
 
protected static Mailbox createLimitedCopy(Mailbox origin)
{
Mailbox u = new Mailbox();
u.setLogin(origin.getLogin());
u.setDomain(origin.getDomain());
return u;
}
}
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/MailboxManager.java
8,19 → 8,8
import ak.hostadmiral.util.ModelSecurityException;
 
public class MailboxManager
implements
UserBeforeDeleteListener,
SystemUserBeforeDeleteListener,
InetDomainBeforeDeleteListener
{
private static MailboxManager mailboxManager = null;
private static boolean registered = false;
 
public static MailboxManager getInstance()
{
return mailboxManager;
}
 
protected static void register()
{
synchronized(MailboxManager.class) {
30,8 → 19,6
try {
HibernateUtil.getConfiguration().addResource(
"/ak/hostadmiral/core/model/Mailbox.hbm.xml");
 
mailboxManager = new MailboxManager();
}
catch(Exception ex) {
ex.printStackTrace();
44,13 → 31,8
register();
}
 
private Collection beforeDeleteListeners = new ArrayList();
 
private MailboxManager()
{
UserManager.getInstance().addBeforeDeleteListener(this);
SystemUserManager.getInstance().addBeforeDeleteListener(this);
InetDomainManager.getInstance().addBeforeDeleteListener(this);
}
 
public Mailbox create(User editor)
148,31 → 130,6
}
}
 
public void addBeforeDeleteListener(MailboxBeforeDeleteListener listener)
{
beforeDeleteListeners.add(listener);
}
 
public void removeBeforeDeleteListener(MailboxBeforeDeleteListener listener)
{
beforeDeleteListeners.remove(listener);
}
 
public Collection beforeDelete(User editor, Mailbox mailbox, Collection known)
throws ModelException
{
Collection cascade = new ArrayList();
 
for(Iterator i = beforeDeleteListeners.iterator(); i.hasNext(); ) {
MailboxBeforeDeleteListener listener = (MailboxBeforeDeleteListener)i.next();
Collection subcascade = listener.mailboxBeforeDelete(editor, mailbox, known);
if(subcascade != null)
cascade.addAll(subcascade);
}
 
return cascade;
}
 
public void delete(User editor, Mailbox mailbox)
throws ModelException
{
231,81 → 188,14
}
}
 
public Collection userBeforeDelete(User editor, User user, Collection known)
throws ModelException
{
Collection mailboxes;
private static MailboxManager mailboxManager = null;
 
try {
mailboxes = HibernateUtil.currentSession().find(
"from Mailbox where owner = ?",
user, Hibernate.entity(User.class) );
}
catch(HibernateException ex)
{
throw new ModelException(ex);
}
 
return iterateBeforeDelete(editor, mailboxes, known);
}
 
public Collection inetDomainBeforeDelete(User editor, InetDomain domain, Collection known)
throws ModelException
public static MailboxManager getInstance()
{
Collection mailboxes;
if(mailboxManager == null)
mailboxManager = new MailboxManager();
 
try {
mailboxes = HibernateUtil.currentSession().find(
"from Mailbox where domain = ?",
domain, Hibernate.entity(InetDomain.class) );
}
catch(HibernateException ex)
{
throw new ModelException(ex);
}
 
return iterateBeforeDelete(editor, mailboxes, known);
}
 
public Collection systemUserBeforeDelete(User editor, SystemUser user, Collection known)
throws ModelException
{
Collection mailboxes;
 
try {
mailboxes = HibernateUtil.currentSession().find(
"from Mailbox where systemUser = ?",
user, Hibernate.entity(SystemUser.class) );
}
catch(HibernateException ex)
{
throw new ModelException(ex);
}
 
return iterateBeforeDelete(editor, mailboxes, known);
}
 
private Collection iterateBeforeDelete(User editor, Collection mailboxes, Collection known)
throws ModelException
{
Collection cascade = new ArrayList();
for(Iterator i = mailboxes.iterator(); i.hasNext(); ) {
Mailbox mailbox = (Mailbox)i.next();
if(mailbox.viewableBy(editor)) {
if(mailbox.deleteableBy(editor))
cascade.add(new CascadeDeleteElement(mailbox, CascadeDeleteElement.DELETE,
this.beforeDelete(editor, mailbox, known)));
else
cascade.add(new CascadeDeleteElement(mailbox, CascadeDeleteElement.FORBIDDEN,
null));
}
else {
cascade.add(new CascadeDeleteElement(Mailbox.createLimitedCopy(mailbox),
CascadeDeleteElement.FORBIDDEN, null));
}
}
 
return cascade;
return mailboxManager;
}
 
public static final Comparator LOGIN_COMPARATOR = new LoginComparator();
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/SystemUserManager.java
8,16 → 8,8
import ak.hostadmiral.util.ModelSecurityException;
 
public class SystemUserManager
implements UserBeforeDeleteListener
{
private static SystemUserManager systemUserManager = null;
private static boolean registered = false;
 
public static SystemUserManager getInstance()
{
return systemUserManager;
}
 
protected static void register()
{
synchronized(SystemUserManager.class) {
27,8 → 19,6
try {
HibernateUtil.getConfiguration().addResource(
"/ak/hostadmiral/core/model/SystemUser.hbm.xml");
 
systemUserManager = new SystemUserManager();
}
catch(Exception ex) {
ex.printStackTrace();
41,11 → 31,8
register();
}
 
private Collection beforeDeleteListeners = new ArrayList();
 
private SystemUserManager()
{
UserManager.getInstance().addBeforeDeleteListener(this);
}
 
public SystemUser create(User editor)
178,31 → 165,6
}
}
 
public void addBeforeDeleteListener(SystemUserBeforeDeleteListener listener)
{
beforeDeleteListeners.add(listener);
}
 
public void removeBeforeDeleteListener(SystemUserBeforeDeleteListener listener)
{
beforeDeleteListeners.remove(listener);
}
 
public Collection beforeDelete(User editor, SystemUser user, Collection known)
throws ModelException
{
Collection cascade = new ArrayList();
 
for(Iterator i = beforeDeleteListeners.iterator(); i.hasNext(); ) {
SystemUserBeforeDeleteListener listener = (SystemUserBeforeDeleteListener)i.next();
Collection subcascade = listener.systemUserBeforeDelete(editor, user, known);
if(subcascade != null)
cascade.addAll(subcascade);
}
 
return cascade;
}
 
public void delete(User editor, SystemUser systemUser)
throws ModelException
{
254,38 → 216,14
}
}
 
public Collection userBeforeDelete(User editor, User user, Collection known)
throws ModelException
private static SystemUserManager systemUserManager = null;
 
public static SystemUserManager getInstance()
{
Collection systemUsers;
if(systemUserManager == null)
systemUserManager = new SystemUserManager();
 
try {
systemUsers = HibernateUtil.currentSession().find(
"from SystemUser where owner = ?",
user, Hibernate.entity(User.class) );
}
catch(HibernateException ex)
{
throw new ModelException(ex);
}
 
Collection cascade = new ArrayList();
for(Iterator i = systemUsers.iterator(); i.hasNext(); ) {
SystemUser u = (SystemUser)i.next();
if(u.viewableBy(editor)) {
if(u.deleteableBy(editor))
cascade.add(new CascadeDeleteElement(u, CascadeDeleteElement.DELETE,
this.beforeDelete(editor, u, known)));
else
cascade.add(new CascadeDeleteElement(u, CascadeDeleteElement.FORBIDDEN, null));
}
else {
cascade.add(new CascadeDeleteElement(SystemUser.createLimitedCopy(u),
CascadeDeleteElement.FORBIDDEN, null));
}
}
 
return cascade;
return systemUserManager;
}
 
public static final Comparator UID_COMPARATOR = new UidComparator();
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/model/ModelObject.java
2,8 → 2,6
 
public interface ModelObject
{
public Long getId();
 
public String getTypeKey();
 
public String getIdentKey();
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/CoreResources.properties
22,7 → 22,7
ak.hostadmiral.core.password.dontMatch=The passwords you entered doesn't match
 
ak.hostadmiral.core.user.login.nonunique=The user login already exists
ak.hostadmiral.core.user.id.wrong=Please select an user from the list
ak.hostadmiral.core.user.password.change.id.wrong=Please select an user from the list
ak.hostadmiral.core.user.deletemeself=Can not delete the user you are logged in
ak.hostadmiral.core.user.boss.id.wrong=Please select a boss from the list
ak.hostadmiral.core.user.system.uid.nonunique=The UID already exists
102,23 → 102,7
ak.hostadmiral.page.user.list.view=view
ak.hostadmiral.page.user.list.add=add new user
ak.hostadmiral.page.user.list.back=back
ak.hostadmiral.page.user.list.logins.failed=failed logins
 
ak.hostadmiral.page.user.failedLogins.title=Host Admiral - users - failed logins
ak.hostadmiral.page.user.failedLogins.login=Login
ak.hostadmiral.page.user.failedLogins.user.exists=User Exists
ak.hostadmiral.page.user.failedLogins.time=Login Time
ak.hostadmiral.page.user.failedLogins.success=Success
ak.hostadmiral.page.user.failedLogins.ip=IP
ak.hostadmiral.page.user.failedLogins.back=back
 
ak.hostadmiral.page.user.logins.title=Host Admiral - user - logins
ak.hostadmiral.page.user.logins.login=Logins of user
ak.hostadmiral.page.user.logins.time=Login Time
ak.hostadmiral.page.user.logins.success=Success
ak.hostadmiral.page.user.logins.ip=IP
ak.hostadmiral.page.user.logins.back=back
 
ak.hostadmiral.page.user.edit.title=Host Admiral - user - edit
ak.hostadmiral.page.user.edit.login=Login
ak.hostadmiral.page.user.edit.password=Password
132,7 → 116,6
ak.hostadmiral.page.user.edit.comment=Comment
ak.hostadmiral.page.user.edit.submit=submit
ak.hostadmiral.page.user.edit.back=back
ak.hostadmiral.page.user.edit.logins=login history
 
ak.hostadmiral.page.user.view.title=Host Admiral - user - view
ak.hostadmiral.page.user.view.login=Login
146,7 → 129,6
ak.hostadmiral.page.user.view.enabled.false=no
ak.hostadmiral.page.user.view.comment=Comment
ak.hostadmiral.page.user.view.back=back
ak.hostadmiral.page.user.view.logins=login history
 
ak.hostadmiral.page.user.system.list.title=Host Admiral - system users - list
ak.hostadmiral.page.user.system.list.uid=System ID
/sun/hostadmiral/trunk/src/ak/hostadmiral/core/servlet/ProfilerFilter.java
File deleted
/sun/hostadmiral/trunk/doc/todo.txt
1,6 → 1,3
Host Admiral TODO
=================
 
+ Save user id for all db-update operations.
 
Set 'editor' for an object by loading and not require it for each property change?
8,60 → 5,10
 
Specification for the model.
 
Test cases for model, based on the specification. Check all bound conditions
- e.g. security exceptions. Write a complete scenario to start with default database;
login as admin, create users, domains, logout; login as normal user,
create/delete/modify mailboxes and aliases etc.
Test cases for model, based on the specification. Check all bound conditions - e.g. security exceptions.
Write a complete scenario to start with default database, login as admin, create users, domaind, logout,
login as normal user, create/delete/modify mailboxes and aliases etc.
 
Test cases for actions, not so detailed as for the model
(because it makes no sense to parse html pages).
Test cases for actions, not so detailed as for the model (because it makes no sense to parse html pages).
The scenario for the model test can be used.
 
Cascade object deletion, confirmation page.
 
Store user and malbox passwords in several forms; e.g. clear text, md5, encrypt. Allow
admin to specify which forms to use.
 
Check passwords quality (make a separate project for this).
 
Show filters, search.
 
Multi-page lists.
 
Sort options for lists.
 
Different user name schemes, not only user@domain. Define an interface to allow admin
implement an own one. Implement a few common ones.
 
Taglig to show ActionMessages in right way (add it to the StrutsX project).
 
Allow to use existing system users: enter uid or name only, check in system for full
information.
 
I18n. Switch language of page on the fly. Save selection in DB for each user.
Allow admin to define default language for server and domain.
 
Split CoreResources.properties to several files.
 
Show domain for user which is in the domain.
 
Check, if it's possible to create (or change) an object by admin that the object's owner
is not allowed to see it.
 
Check maxlength.
 
Make hierarchy of domains.
 
Allow user to create domains (?) and subdomains in his domains.
 
Change shell password for system user if its onwer's password is changed (?).
 
Catch-all mail alias. Only one per domain.
 
+ User login history.
 
Listeners for all operations.
 
Basic scripts to push changes to the system.
 
If mailbox is created, create an user and a mail alias for it in one step - as option.
/sun/hostadmiral/trunk/sql/00.tables.sql
28,20 → 28,6
constraint users_boss foreign key (boss) references users(id)
);
 
-- login tries. "usr" is set if the user is found only
create table userlogins
(
id integer not null,
usr integer,
login varchar(255) not null,
logintime timestamp not null,
success char(1) default '0' check (success = '1' or success = '0'),
ip inet not null,
 
constraint userlogins_prim primary key (id),
constraint userlogins_user foreign key (usr) references users(id)
);
 
-- default user admin:admin
insert into users (id, login, password, superuser) values (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', '1');
select nextval('hibernate_sequence'); -- skip id of the default user