mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
16107: Build fix - Now that org.alfresco.repo.template.People is using public AuthenticationService, only admins have rights to check account enablement git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16108 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,7 @@ import java.util.List;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||||
import org.alfresco.repo.security.authority.AuthorityDAO;
|
import org.alfresco.repo.security.authority.AuthorityDAO;
|
||||||
import org.alfresco.service.ServiceRegistry;
|
import org.alfresco.service.ServiceRegistry;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
@@ -235,7 +236,13 @@ public class People extends BaseTemplateProcessorExtension
|
|||||||
*/
|
*/
|
||||||
public boolean isAccountEnabled(TemplateNode person)
|
public boolean isAccountEnabled(TemplateNode person)
|
||||||
{
|
{
|
||||||
return this.authenticationService.getAuthenticationEnabled((String)person.getProperties().get(ContentModel.PROP_USERNAME));
|
// Only admins have rights to check authentication enablement
|
||||||
|
if (this.authorityService.isAdminAuthority(AuthenticationUtil.getFullyAuthenticatedUser()))
|
||||||
|
{
|
||||||
|
return this.authenticationService.getAuthenticationEnabled((String) person.getProperties().get(
|
||||||
|
ContentModel.PROP_USERNAME));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user