mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-17 14:21:39 +00:00
REPO-4132: After upgrade the repository is empty (related to system user cleanup) (#312)
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Repository
|
* Alfresco Repository
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
* Copyright (C) 2005 - 2019 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* If the software was purchased under a paid Alfresco license, the terms of
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
@@ -72,17 +72,18 @@ public class UsernamePropertyDecorator extends BasePropertyDecorator
|
|||||||
firstName = "";
|
firstName = "";
|
||||||
lastName = "";
|
lastName = "";
|
||||||
}
|
}
|
||||||
|
// Check for System before going to the PersonService
|
||||||
|
else if (username.equals("System") || username.startsWith("System@"))
|
||||||
|
{
|
||||||
|
firstName = "System";
|
||||||
|
lastName = "User";
|
||||||
|
}
|
||||||
else if (this.personService.personExists(username))
|
else if (this.personService.personExists(username))
|
||||||
{
|
{
|
||||||
NodeRef personRef = this.personService.getPerson(username, false);
|
NodeRef personRef = this.personService.getPerson(username, false);
|
||||||
firstName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_FIRSTNAME);
|
firstName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_FIRSTNAME);
|
||||||
lastName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_LASTNAME);
|
lastName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_LASTNAME);
|
||||||
}
|
}
|
||||||
else if (username.equals("System") || username.startsWith("System@"))
|
|
||||||
{
|
|
||||||
firstName = "System";
|
|
||||||
lastName = "User";
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
map.put("isDeleted", true);
|
map.put("isDeleted", true);
|
||||||
|
Reference in New Issue
Block a user