mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
15506: Fix for ALFCOM-3274 - removed double-encoding of webview dashlet title when set from Configure dialog. 15543: Fixes for ETHREEOH-2596 and ETHREEOH-2392. Any Admin user now forced to enter old password when editing themselves in the Share User Admin console. 15620:Merged V3.1 to V3.2 15595: Merged DEV-TEMPORARY to V3.1 15446: Appropriate JSP page was modified to align radio buttons. 15597: Fix for ETHREEOH-2575 - all PNG files now appear in IE6, note that PNG transparency is not supported in IE6. 15598: Merged DEV-TEMPORARY to V3.1 15593: ETHREEOH-2445: Localization Issues [Email Templates and RSS Templates ACPs I18N] 15599: Merged DEV-TEMPORARY to V3.1 15491: ETHREEOH-2460: Localization Issues - Email template 15601: *RECORD ONLY* Merged V3.2 to V3.1 15504: ETHREEOH-2447: My Content page localisation failing. [backport from V3.2] 15613: *RECORD ONLY* Removed reference to portlets message bundle - as per CHK-8518 15784: Minor performance improvements to data dictionary classes relating to Permission evaluations. 15791: Merged V3.1 to V3.2 15693: Merged DEV-TEMPORARY to V3.1 15648: ETHREEOH-2549: Templates in 3.1 will need localising 15743: ETHREEOH-2586: JP:Layout error, the word "....." (cancel) should be in the same line 15745: ETHREEOH-2493 - HTML and XML encoding fixes to Alfresco OpenSearch keyword and person search HTML/ATOM/RSS feed templates. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15793 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,7 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.service.cmr.dictionary.AspectDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
||||
@@ -101,6 +102,14 @@ import org.alfresco.service.namespace.QName;
|
||||
return type.getDefaultAspects(inherited);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.dictionary.ClassDefinition#getDefaultAspectNames()
|
||||
*/
|
||||
public Set<QName> getDefaultAspectNames()
|
||||
{
|
||||
return type.getDefaultAspectNames();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.dictionary.ClassDefinition#getName()
|
||||
*/
|
||||
|
@@ -29,8 +29,10 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.service.cmr.dictionary.AspectDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
||||
@@ -65,6 +67,7 @@ import org.alfresco.service.namespace.QName;
|
||||
private List<AspectDefinition> defaultAspects = new ArrayList<AspectDefinition>();
|
||||
private List<QName> defaultAspectNames = new ArrayList<QName>();
|
||||
private List<AspectDefinition> inheritedDefaultAspects = new ArrayList<AspectDefinition>();
|
||||
private Set<QName> inheritedDefaultAspectNames = new HashSet<QName>();
|
||||
private Boolean archive = null;
|
||||
private Boolean inheritedArchive = null;
|
||||
|
||||
@@ -299,6 +302,12 @@ import org.alfresco.service.namespace.QName;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert to set of names
|
||||
for (AspectDefinition aspDef : inheritedDefaultAspects)
|
||||
{
|
||||
inheritedDefaultAspectNames.add(aspDef.getName());
|
||||
}
|
||||
|
||||
// resolve archive inheritance
|
||||
if (parentClass != null && archive == null)
|
||||
{
|
||||
@@ -436,6 +445,14 @@ import org.alfresco.service.namespace.QName;
|
||||
{
|
||||
return inherited ? getDefaultAspects() : defaultAspects;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.dictionary.ClassDefinition#getDefaultAspectNames()
|
||||
*/
|
||||
public Set<QName> getDefaultAspectNames()
|
||||
{
|
||||
return inheritedDefaultAspectNames;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.dictionary.ClassDefinition#isContainer()
|
||||
|
@@ -491,26 +491,19 @@ public class PermissionModel implements ModelDAO, InitializingBean
|
||||
|
||||
private Set<PermissionReference> getAllPermissionsImpl(QName typeName, Set<QName> aspects, boolean exposedOnly)
|
||||
{
|
||||
Set<PermissionReference> permissions = new LinkedHashSet<PermissionReference>(256, 1.0f);
|
||||
Set<PermissionReference> permissions = new LinkedHashSet<PermissionReference>(128, 1.0f);
|
||||
|
||||
ClassDefinition cd = dictionaryService.getClass(typeName);
|
||||
permissions.addAll(getAllPermissionsImpl(typeName, exposedOnly));
|
||||
|
||||
if (cd != null)
|
||||
if (cd != null && aspects != null)
|
||||
{
|
||||
Set<QName> defaultAspects = new HashSet<QName>();
|
||||
for (AspectDefinition aspDef : cd.getDefaultAspects())
|
||||
Set<QName> defaultAspects = cd.getDefaultAspectNames();
|
||||
for (QName aspect : aspects)
|
||||
{
|
||||
defaultAspects.add(aspDef.getName());
|
||||
}
|
||||
if (aspects != null)
|
||||
{
|
||||
for (QName aspect : aspects)
|
||||
if (!defaultAspects.contains(aspect))
|
||||
{
|
||||
if (!defaultAspects.contains(aspect))
|
||||
{
|
||||
addAspectPermissions(aspect, permissions, exposedOnly);
|
||||
}
|
||||
addAspectPermissions(aspect, permissions, exposedOnly);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@ package org.alfresco.service.cmr.dictionary;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
@@ -115,6 +116,11 @@ public interface ClassDefinition
|
||||
*/
|
||||
public List<AspectDefinition> getDefaultAspects();
|
||||
|
||||
/**
|
||||
* @return the set of default aspects names associated with this type
|
||||
*/
|
||||
public Set<QName> getDefaultAspectNames();
|
||||
|
||||
/**
|
||||
* @param inherited include default aspects inherited from super types
|
||||
* @return the default aspects
|
||||
|
Reference in New Issue
Block a user