Add a Register link when using LDAP authentication

If auth.type is LDAP Gerrit is responsible for collecting the username
and password and authenticating to the directory.  But we don't have a
way to create new users in the directory, as this is far beyond any
scope we want to handle.

Site administrators might have a URL users can visit to create their
own account, or maybe just want to publish a mailto: link so the user
can request an account to be manually created for them.  Allow those
links to be configured through gerrit.config as auth.registerUrl.

Change-Id: I996ed53c5b80579f3a60cfcf9aebb7940d501366
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-12-16 08:05:27 -08:00
parent ceb96cb38c
commit c9d26b5336
4 changed files with 32 additions and 15 deletions

View File

@@ -23,7 +23,7 @@ import java.util.List;
import java.util.Set;
public class GerritConfig implements Cloneable {
protected String canonicalUrl;
protected String registerUrl;
protected GitwebLink gitweb;
protected boolean useContributorAgreements;
protected boolean useContactInfo;
@@ -37,12 +37,12 @@ public class GerritConfig implements Cloneable {
protected Set<Account.FieldName> editableAccountFields;
protected List<RegexFindReplace> commentLinks;
public String getCanonicalUrl() {
return canonicalUrl;
public String getRegisterUrl() {
return registerUrl;
}
public void setCanonicalUrl(final String u) {
canonicalUrl = u;
public void setRegisterUrl(final String u) {
registerUrl = u;
}
public AuthType getAuthType() {