mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
fix support for trusted domains, see #28
This commit is contained in:
@@ -278,10 +278,10 @@ public class ActiveDirectoryAuthenticationHandler
|
||||
|
||||
if (index > 0)
|
||||
{
|
||||
String domain = username.substring(0, index);
|
||||
String domain = username.substring(0, index).toUpperCase();
|
||||
|
||||
username = username.substring(index + 1);
|
||||
add = domainMap.get(domain.toUpperCase());
|
||||
add = domainMap.get(domain);
|
||||
|
||||
if (add != null)
|
||||
{
|
||||
@@ -456,6 +456,8 @@ public class ActiveDirectoryAuthenticationHandler
|
||||
|
||||
if (Util.isNotEmpty(cn) && Util.isNotEmpty(dn))
|
||||
{
|
||||
cn = cn.toUpperCase();
|
||||
|
||||
if (logger.isInfoEnabled())
|
||||
{
|
||||
logger.info("found domain: {}, {}, {}", new Object[] { cn, dn,
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
<os>
|
||||
<name>windows</name>
|
||||
</os>
|
||||
<min-version>1.5</min-version>
|
||||
</conditions>
|
||||
|
||||
</plugin>
|
||||
|
||||
@@ -125,7 +125,7 @@ public class BasicSecurityContext implements WebSecurityContext
|
||||
|
||||
try
|
||||
{
|
||||
User dbUser = userManager.get(username);
|
||||
User dbUser = userManager.get(user.getName());
|
||||
|
||||
if ((dbUser != null) && user.copyProperties(dbUser, false))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user