mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
19614: ALF-1890: Merged V2.2 to V3.2 17709: Merged DEV_TEMPORARY to V2.2 17700: ETWOTWO-1393: concurrent writes to webdav lead to data loss (0kb resulting file) 19613: Merged DEV/BELARUS/V2.2-2010_02_03 to V2.2 19157: ALF-1890: concurrent writes to webdav lead to data loss (0kb resulting file) 19562: Merged DEV/BELARUS/V3.2-2010_02_24 to V3.2 19244: ALF-1816: Email templates can no longer be selected when creating a rule for the action 'Send email to specified users' following an upgrade - New patch has been created to create invite email templates and notify email templates folders if those are absent. Also it moves default notify and invite templates into appropriate folders. 19561: Merged DEV/BELARUS/V3.2-2010_02_24 to V3.2 (With improvements) 19294: ALF-929: email to invite external users does not allow external users to login (no credentails) - Always create a password for created users if the authentication chain allows account creation git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19615 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1098,6 +1098,7 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
|
||||
// get the inviter user name (the name of user web script is executed
|
||||
// under)
|
||||
String inviterUserName = this.authenticationService.getCurrentUserName();
|
||||
boolean created = false;
|
||||
|
||||
checkManagerRole(inviterUserName, resourceType, siteShortName);
|
||||
|
||||
@@ -1164,10 +1165,16 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
|
||||
|
||||
if (inviteeUserName == null)
|
||||
{
|
||||
// This shouldn't normally happen. Due to the fix for ETHREEOH-3268, the link to invite external users
|
||||
// should be disabled when the authentication chain does not allow it.
|
||||
if (!authenticationService.isAuthenticationCreationAllowed())
|
||||
{
|
||||
throw new InvitationException("invitation.invite.authentication_chain");
|
||||
}
|
||||
// else there are no existing people who have the given invitee
|
||||
// email address so create new person
|
||||
inviteeUserName = createInviteePerson(inviteeFirstName, inviteeLastName, inviteeEmail);
|
||||
|
||||
created = true;
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("not explictly passed username - created new person, inviteeUserName="
|
||||
@@ -1211,19 +1218,14 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
|
||||
// user name, then local reference to invitee password will be "null"
|
||||
//
|
||||
final String initeeUserNameFinal = inviteeUserName;
|
||||
String inviteePassword = AuthenticationUtil.runAs(new RunAsWork<String>()
|
||||
|
||||
String inviteePassword = created ? AuthenticationUtil.runAs(new RunAsWork<String>()
|
||||
{
|
||||
public String doWork()
|
||||
{
|
||||
if (!InvitationServiceImpl.this.authenticationService.authenticationExists(initeeUserNameFinal))
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Invitee user account does not exist, creating disabled account.");
|
||||
return createInviteeDisabledAccount(initeeUserNameFinal);
|
||||
}
|
||||
return null;
|
||||
return createInviteeDisabledAccount(initeeUserNameFinal);
|
||||
}
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
}, AuthenticationUtil.getSystemUserName()) : null;
|
||||
|
||||
// create a ticket for the invite - this is used
|
||||
String inviteTicket = GUID.generate();
|
||||
|
Reference in New Issue
Block a user