mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix to painfully broken PeoplePut REST API implementation.
- it was hilariously passing a Script object directly into a Template model - useful. - due to some recent changes the template model was finally being used in the person PUT template so this long-standing bug was triggered git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13901 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,11 +29,11 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.jscript.ScriptNode;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.repo.template.TemplateNode;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
@@ -198,7 +198,7 @@ public class PersonPut extends DeclarativeWebScript
|
||||
updatePersonPropertiesWorker, this.authenticationComponent.getSystemUserName());
|
||||
|
||||
// Put the updated person on the model to pass to the template
|
||||
model.put(MODEL_PROP_KEY_PERSON, new ScriptNode(updatedPerson, this.serviceRegistry));
|
||||
model.put(MODEL_PROP_KEY_PERSON, new TemplateNode(updatedPerson, this.serviceRegistry, null));
|
||||
}
|
||||
// else if no person was found matching the given user name,
|
||||
// then return HTTP error status "not found"
|
||||
|
Reference in New Issue
Block a user