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