mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
100986: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud) 100829: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2) 100693: Merged DEV to V4.2-BUG-FIX (4.2.5) 89520 : MNT-12597: Share: Accepting site invitation via email does not show on the 'Completed Task' task. - Using asignee from request parameter git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@101001 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -79,10 +79,10 @@ public class InviteResponse extends DeclarativeWebScript
|
||||
protected Map<String, Object> executeImpl(final WebScriptRequest req, final Status status)
|
||||
{
|
||||
String tenantDomain = TenantService.DEFAULT_DOMAIN;
|
||||
final String inviteeUserName = req.getParameter(PARAM_INVITEE_USER_NAME);
|
||||
|
||||
if (tenantService.isEnabled())
|
||||
{
|
||||
String inviteeUserName = req.getParameter(PARAM_INVITEE_USER_NAME);
|
||||
if (inviteeUserName != null)
|
||||
{
|
||||
tenantDomain = tenantService.getUserDomain(inviteeUserName);
|
||||
@@ -94,7 +94,23 @@ public class InviteResponse extends DeclarativeWebScript
|
||||
{
|
||||
public Map<String, Object> doWork() throws Exception
|
||||
{
|
||||
return execute(req, status);
|
||||
String oldUser = null;
|
||||
try
|
||||
{
|
||||
if (inviteeUserName != null && !inviteeUserName.equals(oldUser))
|
||||
{
|
||||
oldUser = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(inviteeUserName);
|
||||
}
|
||||
return execute(req, status);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (oldUser != null && !oldUser.equals(inviteeUserName))
|
||||
{
|
||||
AuthenticationUtil.setFullyAuthenticatedUser(oldUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, tenantDomain);
|
||||
}
|
||||
|
Reference in New Issue
Block a user