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)
97693: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud) 97683: Merged 5.0.1 (5.0.1) to 5.0.N (5.0.2) 97651: Merged DEV to PATCHES/5.0.1 (5.0.1) 97532 : MNT-13418 : When performing upgrade with a tenant, patch.siteAdministrators and patch.alfrescoSearchAdministrators throw an error - Using AuthenticationUtils to get administrator's username git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@97705 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -920,9 +920,6 @@
|
|||||||
<property name="groupDisplayName">
|
<property name="groupDisplayName">
|
||||||
<value>SITE_ADMINISTRATORS</value>
|
<value>SITE_ADMINISTRATORS</value>
|
||||||
</property>
|
</property>
|
||||||
<property name="adminUserName">
|
|
||||||
<value>${alfresco_user_store.adminusername}</value>
|
|
||||||
</property>
|
|
||||||
<property name="authorityZones">
|
<property name="authorityZones">
|
||||||
<set>
|
<set>
|
||||||
<value>APP.DEFAULT</value>
|
<value>APP.DEFAULT</value>
|
||||||
@@ -955,9 +952,6 @@
|
|||||||
<property name="groupDisplayName">
|
<property name="groupDisplayName">
|
||||||
<value>ALFRESCO_SEARCH_ADMINISTRATORS</value>
|
<value>ALFRESCO_SEARCH_ADMINISTRATORS</value>
|
||||||
</property>
|
</property>
|
||||||
<property name="adminUserName">
|
|
||||||
<value>${alfresco_user_store.adminusername}</value>
|
|
||||||
</property>
|
|
||||||
<property name="authorityZones">
|
<property name="authorityZones">
|
||||||
<set>
|
<set>
|
||||||
<value>APP.DEFAULT</value>
|
<value>APP.DEFAULT</value>
|
||||||
|
@@ -22,6 +22,7 @@ package org.alfresco.repo.admin.patch.impl;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.alfresco.repo.admin.patch.AbstractPatch;
|
import org.alfresco.repo.admin.patch.AbstractPatch;
|
||||||
|
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||||
import org.alfresco.service.cmr.security.AuthorityService;
|
import org.alfresco.service.cmr.security.AuthorityService;
|
||||||
import org.alfresco.service.cmr.security.AuthorityType;
|
import org.alfresco.service.cmr.security.AuthorityType;
|
||||||
import org.springframework.extensions.surf.util.I18NUtil;
|
import org.springframework.extensions.surf.util.I18NUtil;
|
||||||
@@ -76,13 +77,8 @@ public class AddGroupAuthorityPatch extends AbstractPatch
|
|||||||
this.groupAuthorityDetails.groupDisplayName,
|
this.groupAuthorityDetails.groupDisplayName,
|
||||||
this.groupAuthorityDetails.authorityZones);
|
this.groupAuthorityDetails.authorityZones);
|
||||||
|
|
||||||
if (this.groupAuthorityDetails.adminUserName != null
|
authorityService.addAuthority(groupAuthorityName, AuthenticationUtil.getAdminUserName());
|
||||||
&& authorityService.isAdminAuthority(this.groupAuthorityDetails.adminUserName))
|
|
||||||
{
|
|
||||||
// Add admin as a member of the created group
|
|
||||||
authorityService.addAuthority(groupAuthorityName,
|
|
||||||
this.groupAuthorityDetails.adminUserName);
|
|
||||||
}
|
|
||||||
result.append(I18NUtil.getMessage(MSG_RESULT, groupAuthorityName));
|
result.append(I18NUtil.getMessage(MSG_RESULT, groupAuthorityName));
|
||||||
|
|
||||||
return result.toString();
|
return result.toString();
|
||||||
@@ -97,7 +93,6 @@ public class AddGroupAuthorityPatch extends AbstractPatch
|
|||||||
{
|
{
|
||||||
private String groupName;
|
private String groupName;
|
||||||
private String groupDisplayName;
|
private String groupDisplayName;
|
||||||
private String adminUserName;
|
|
||||||
private Set<String> authorityZones;
|
private Set<String> authorityZones;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -116,17 +111,6 @@ public class AddGroupAuthorityPatch extends AbstractPatch
|
|||||||
this.groupDisplayName = groupDisplayName;
|
this.groupDisplayName = groupDisplayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the Admin's username, so it can be included as a member of the
|
|
||||||
* group. If null, an empty group will be created.
|
|
||||||
*
|
|
||||||
* @param adminUserName the adminUserName to set
|
|
||||||
*/
|
|
||||||
public void setAdminUserName(String adminUserName)
|
|
||||||
{
|
|
||||||
this.adminUserName = adminUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param authorityZones the authorityZones to set
|
* @param authorityZones the authorityZones to set
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user