diff --git a/source/java/org/alfresco/repo/model/Repository.java b/source/java/org/alfresco/repo/model/Repository.java index 181b874d83..d295f48328 100644 --- a/source/java/org/alfresco/repo/model/Repository.java +++ b/source/java/org/alfresco/repo/model/Repository.java @@ -256,7 +256,7 @@ public class Repository implements ApplicationContextAware, ApplicationListener, /** * Gets the currently authenticated person - * + * Includes any overlay authentication set by runas * @return person node ref */ public NodeRef getPerson() @@ -272,6 +272,25 @@ public class Repository implements ApplicationContextAware, ApplicationListener, } return person; } + + /** + * Gets the currently fully authenticated person, + * Excludes any overlay authentication set by runas + * @return person node ref + */ + public NodeRef getFullyAuthenticatedPerson() + { + NodeRef person = null; + String currentUserName = AuthenticationUtil.getFullyAuthenticatedUser(); + if (currentUserName != null) + { + if (personService.personExists(currentUserName)) + { + person = personService.getPerson(currentUserName); + } + } + return person; + } /** * Gets the user home of the currently authenticated person