Commit 1c4bf9eb authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Added functionality in lockout providers to not support delayed starts and/or timeouts.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9924 b35dd754-fafc-0310-a699-88a17e54d16e
parent ef0b5498
......@@ -150,4 +150,20 @@ public class DefaultLockOutProvider implements LockOutProvider {
return false;
}
/**
* Default provider allows delayed start to disabled status.
* @see org.jivesoftware.openfire.lockout.LockOutProvider#isDelayedStartSupported()
*/
public boolean isDelayedStartSupported() {
return true;
}
/**
* Default provider allows timeout of disabled status.
* @see org.jivesoftware.openfire.lockout.LockOutProvider#isTimeoutSupported()
*/
public boolean isTimeoutSupported() {
return true;
}
}
......@@ -50,4 +50,24 @@ public interface LockOutProvider {
*/
public boolean isReadOnly();
/**
* Returns true if the LockOutProvider allows for a delayed start to the lockout.
* e.g. you can set the lockout to start in one hour. This is really only used for UI
* in the admin interface. It's up to the provider implementation to ignore the start
* time.
*
* @return true if the lock out provider provides this feature.
*/
public boolean isDelayedStartSupported();
/**
* Returns true if the LockOutProvider allows for a timeout after which the lock out will expire.
* e.g. you can set the lockout to only last for one day. This is really only used for UI
* in the admin interface. It's up to the provider implementation to ignore the end
* time.
*
* @return true if the lcok out provider provides this feature.
*/
public boolean isTimeoutSupported();
}
......@@ -146,6 +146,7 @@
</c:if>
<form action="user-lockout.jsp">
<% if (LockOutManager.getLockOutProvider().isDelayedStartSupported()) { %>
<b><fmt:message key="user.lockout.time.startdelay" /></b><br />
<input type="radio" name="startdelay" value="-1" checked="checked" /> <fmt:message key="user.lockout.time.immediate" /><br />
<input type="radio" name="startdelay" value="60" /> <fmt:message key="user.lockout.time.in" /> <fmt:message key="user.lockout.time.1hour" /><br />
......@@ -153,6 +154,8 @@
<input type="radio" name="startdelay" value="10080" /> <fmt:message key="user.lockout.time.in" /> <fmt:message key="user.lockout.time.1week" /><br />
<input type="radio" name="startdelay" value="-2" /> <fmt:message key="user.lockout.time.in" /> <input type="text" size="5" maxlength="10" name="starydelay_custom" /> <fmt:message key="user.lockout.time.minutes"/><br />
<br />
<% } %>
<% if (LockOutManager.getLockOutProvider().isTimeoutSupported()) { %>
<b><fmt:message key="user.lockout.time.duration" /></b><br />
<input type="radio" name="duration" value="-1" checked="checked" /> <fmt:message key="user.lockout.time.forever" /><br />
<input type="radio" name="duration" value="60" /> <fmt:message key="user.lockout.time.for" /> <fmt:message key="user.lockout.time.1hour" /><br />
......@@ -160,6 +163,7 @@
<input type="radio" name="duration" value="10080" /> <fmt:message key="user.lockout.time.for" /> <fmt:message key="user.lockout.time.1week" /><br />
<input type="radio" name="duration" value="-2" /> <fmt:message key="user.lockout.time.for" /> <input type="text" size="5" maxlength="10" name="duration_custom" /> <fmt:message key="user.lockout.time.minutes"/><br />
<br />
<% } %>
<input type="hidden" name="username" value="<%= username %>">
<input type="submit" name="lock" value="<fmt:message key="user.lockout.lock" />">
<input type="submit" name="cancel" value="<fmt:message key="global.cancel" />">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment