mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged mward/5.2.n-repo1636-contentinfo (5.2.1) to 5.2.N (5.2.1)
133306 mward: REPO-1636: Now filter the entire "usr" namespace, rather than just usr:enabled git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133310 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -58,6 +58,7 @@ import org.alfresco.service.cmr.security.PersonService;
|
||||
import org.alfresco.service.cmr.site.SiteService;
|
||||
import org.alfresco.service.cmr.thumbnail.ThumbnailService;
|
||||
import org.alfresco.service.cmr.usage.ContentUsageService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.Pair;
|
||||
|
||||
@@ -79,6 +80,9 @@ import java.util.Set;
|
||||
*/
|
||||
public class PeopleImpl implements People
|
||||
{
|
||||
private static final List<String> EXCLUDED_NS = Arrays.asList(
|
||||
NamespaceService.SYSTEM_MODEL_1_0_URI,
|
||||
"http://www.alfresco.org/model/user/1.0");
|
||||
private static final List<QName> EXCLUDED_ASPECTS = Arrays.asList();
|
||||
private static final List<QName> EXCLUDED_PROPS = Arrays.asList(
|
||||
ContentModel.PROP_USERNAME,
|
||||
@@ -105,8 +109,7 @@ public class PeopleImpl implements People
|
||||
ContentModel.PROP_SIZE_QUOTA,
|
||||
ContentModel.PROP_SIZE_CURRENT,
|
||||
ContentModel.PROP_EMAIL_FEED_DISABLED,
|
||||
ContentModel.PROP_PREFERENCE_VALUES,
|
||||
ContentModel.PROP_ENABLED);
|
||||
ContentModel.PROP_PREFERENCE_VALUES);
|
||||
protected Nodes nodes;
|
||||
protected Sites sites;
|
||||
|
||||
@@ -400,14 +403,14 @@ public class PeopleImpl implements People
|
||||
if (include.contains(PARAM_INCLUDE_PROPERTIES))
|
||||
{
|
||||
Map<String, Object> custProps = new HashMap<>();
|
||||
custProps.putAll(nodes.mapFromNodeProperties(nodeProps, new ArrayList<>(), new HashMap<>(), EXCLUDED_PROPS));
|
||||
custProps.putAll(nodes.mapFromNodeProperties(nodeProps, new ArrayList<>(), new HashMap<>(), EXCLUDED_NS, EXCLUDED_PROPS));
|
||||
person.setProperties(custProps);
|
||||
}
|
||||
if (include.contains(PARAM_INCLUDE_ASPECTNAMES))
|
||||
{
|
||||
// Expose aspect names
|
||||
Set<QName> aspects = nodeService.getAspects(personNode);
|
||||
person.setAspectNames(nodes.mapFromNodeAspects(aspects, EXCLUDED_ASPECTS));
|
||||
person.setAspectNames(nodes.mapFromNodeAspects(aspects, EXCLUDED_NS, EXCLUDED_ASPECTS));
|
||||
}
|
||||
|
||||
// get avatar information
|
||||
|
Reference in New Issue
Block a user