mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
84026: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 82663: Neaten logic for MT domain extraction from username git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@84617 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -397,19 +397,22 @@ public class MultiTServiceImpl implements TenantService
|
||||
|
||||
public String getBaseNameUser(String name)
|
||||
{
|
||||
// can be null (e.g. for System user / during app ctx init)
|
||||
// We only bother with MT username@domain format if MT is enabled
|
||||
if (name != null && isEnabled())
|
||||
if (name == null || !isEnabled())
|
||||
{
|
||||
int idx = name.lastIndexOf(SEPARATOR);
|
||||
if (idx != -1)
|
||||
{
|
||||
return name.substring(0, idx);
|
||||
// tenant domain doesn't exists but we are allowed to create
|
||||
// no base name can be resolved for such users -> return
|
||||
}
|
||||
// Can be null (e.g. for System user / during app ctx init)
|
||||
// The name is the name and we don't care about the domain part
|
||||
return name;
|
||||
}
|
||||
// We only bother with MT username@domain format if MT is enabled
|
||||
int idx = name.lastIndexOf(SEPARATOR);
|
||||
if (idx != -1)
|
||||
{
|
||||
return name.substring(0, idx);
|
||||
}
|
||||
else
|
||||
{
|
||||
return name;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user