mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
merge with branch 1.x
This commit is contained in:
@@ -359,12 +359,25 @@ public class ScmConfiguration
|
||||
return forceBaseUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the login attempt limit is enabled.
|
||||
*
|
||||
*
|
||||
* @return true if login attempt limit is enabled
|
||||
*
|
||||
* @since 1.37
|
||||
*/
|
||||
public boolean isLoginAttemptLimitEnabled()
|
||||
{
|
||||
return loginAttemptLimit > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if failed authenticators are skipped.
|
||||
*
|
||||
*
|
||||
* @return true if failed authenticators are skipped
|
||||
*
|
||||
*
|
||||
* @since 1.36
|
||||
*/
|
||||
public boolean isSkipFailedAuthenticators()
|
||||
@@ -590,7 +603,7 @@ public class ScmConfiguration
|
||||
* authenticator finds the user but fails to authenticate the user.
|
||||
*
|
||||
* @param skipFailedAuthenticators true to skip failed authenticators
|
||||
*
|
||||
*
|
||||
* @since 1.36
|
||||
*/
|
||||
public void setSkipFailedAuthenticators(boolean skipFailedAuthenticators)
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
|
||||
package sonia.scm.util;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.math.BigInteger;
|
||||
@@ -352,15 +356,14 @@ public final class Util
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* Returns an emtpy string, if the object is null. Otherwise the result of
|
||||
* the toString method of the object is returned is returned.
|
||||
*
|
||||
* @param value object
|
||||
*
|
||||
* @since 1.13
|
||||
*
|
||||
* @return
|
||||
* @return string value or empty string
|
||||
*/
|
||||
public static String nonNull(Object value)
|
||||
{
|
||||
@@ -369,6 +372,23 @@ public final class Util
|
||||
: "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an emtpy string, if the string is null. Otherwise the string
|
||||
* is returned. The method is available to fix a possible linkage error which
|
||||
* was introduced with version 1.14. Please have a look at:
|
||||
* https://bitbucket.org/sdorra/scm-manager/issue/569/active-directory-plugin-not-working-in
|
||||
*
|
||||
* @param value string value
|
||||
*
|
||||
* @return string value or empty string
|
||||
*
|
||||
* @since 1.38
|
||||
*/
|
||||
public static String nonNull(String value)
|
||||
{
|
||||
return Strings.nullToEmpty(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user