diff --git a/config/alfresco/public-rest-context.xml b/config/alfresco/public-rest-context.xml
index e0e18fbff7..6b329f99c1 100644
--- a/config/alfresco/public-rest-context.xml
+++ b/config/alfresco/public-rest-context.xml
@@ -626,7 +626,6 @@
-
diff --git a/source/java/org/alfresco/rest/api/impl/PeopleImpl.java b/source/java/org/alfresco/rest/api/impl/PeopleImpl.java
index 4b95171dda..f2c29dbdd4 100644
--- a/source/java/org/alfresco/rest/api/impl/PeopleImpl.java
+++ b/source/java/org/alfresco/rest/api/impl/PeopleImpl.java
@@ -104,7 +104,6 @@ public class PeopleImpl implements People
protected SiteService siteService;
protected NodeService nodeService;
protected PersonService personService;
- protected PersonService unprotectedPersonService;
protected AuthenticationService authenticationService;
protected AuthorityService authorityService;
protected ContentUsageService contentUsageService;
@@ -146,11 +145,6 @@ public class PeopleImpl implements People
this.personService = personService;
}
- public void setUnprotectedPersonService(PersonService unprotectedPersonService)
- {
- this.unprotectedPersonService = unprotectedPersonService;
- }
-
public void setAuthenticationService(AuthenticationService authenticationService)
{
this.authenticationService = authenticationService;
@@ -583,16 +577,17 @@ public class PeopleImpl implements People
Map customProps = person.getProperties();
properties.putAll(nodes.mapToNodeProperties(customProps));
}
-
- // The person service only allows admin users to set the properties by default.
- if (!isAdminAuthority())
+
+ // The person service only allows admin users to set the properties by default.
+ AuthenticationUtil.runAsSystem(new RunAsWork()
{
- unprotectedPersonService.setPersonProperties(personIdToUpdate, properties, false);
- }
- else
- {
- personService.setPersonProperties(personIdToUpdate, properties, false);
- }
+ @Override
+ public Void doWork() throws Exception
+ {
+ personService.setPersonProperties(personIdToUpdate, properties, false);
+ return null;
+ }
+ });
// Update custom aspects
nodes.updateCustomAspects(personNodeRef, person.getAspectNames(), EXCLUDED_ASPECTS);