]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
NOJIRA - Added safety check in filterReadOnlyPropertiesForPart to ensure it only...
authorPatrick Schmitz <pschmitz@berkeley.edu>
Wed, 17 Aug 2011 23:56:22 +0000 (23:56 +0000)
committerPatrick Schmitz <pschmitz@berkeley.edu>
Wed, 17 Aug 2011 23:56:22 +0000 (23:56 +0000)
services/authority/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java

index 0420d9242f4937a7173aef1afa3b042e5f0fb0e8..eed07a053b5508b827619208a3a175ee324db772 100644 (file)
@@ -191,8 +191,11 @@ public abstract class AuthorityItemDocumentModelHandler<AICommon>
     public void filterReadOnlyPropertiesForPart(
                Map<String, Object> objectProps, ObjectPartType partMeta) {
        super.filterReadOnlyPropertiesForPart(objectProps, partMeta);
-       objectProps.remove(AuthorityItemJAXBSchema.IN_AUTHORITY);
-       objectProps.remove(AuthorityItemJAXBSchema.CSID);
+       String commonPartLabel = getServiceContext().getCommonPartLabel();
+       if(partMeta.getLabel().equalsIgnoreCase(commonPartLabel)) {
+               objectProps.remove(AuthorityItemJAXBSchema.IN_AUTHORITY);
+               objectProps.remove(AuthorityItemJAXBSchema.CSID);
+       }
     }
 
     @Override