Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-22019

Unable to set secondary type "P:sys:hidden" on document using CMIS client

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not a bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CMIS
    • Security Level: external (External user)
    • Labels:
    • Environment:
      Openshift running Community version 6.0.7 and Docker running 6.1.0-EA

      Description

      Original thread: https://community.alfresco.com/message/836915

       

      I'm trying to add a hidden secondary type to a document using CMIS but can't seem to get it to stay.  Here is an example using the groovy console from CMIS Workbench:

       

       

      import org.apache.chemistry.opencmis.commons.*
      import org.apache.chemistry.opencmis.commons.data.*
      import org.apache.chemistry.opencmis.commons.enums.*
      import org.apache.chemistry.opencmis.client.api.*
      import org.apache.chemistry.opencmis.client.util.*
      
      def cmiso = session.getObjectByPath("/User Homes/JoshWasHere.txt")
      def secondaryTypes = cmiso.getPropertyValue("cmis:secondaryObjectTypeIds")
      secondaryTypes.add("P:dp:restrictable")
      secondaryTypes.add("P:sys:hidden")
      def properties = new HashMap<String, Object>();
      properties.put("cmis:secondaryObjectTypeIds", secondaryTypes)
      cmiso.updateProperties(properties);
       cmiso.getPropertyValue("cmis:secondaryObjectTypeIds")

       

      The Result:

       

      Result: [P:dp:restrictable, P:cm:titled, P:cm:generalclassifiable, P:sys:localized, P:cm:taggable, P:cm:author]

       

      So one of the two secondary types I've added stays.  I don't see any errors in the web server logs. The closest thing I see that might be related is

      PolicyTypeDefintionWrapper [http-nio-8080-exec-5]: Not a policy: {http://www.alfresco.org/model/cmis/1.0/cs01ext}aspects

      I originally identified this issue running Community version 6.0.7 and have been able to reproduce it with Community Early Access 6.1.0 but not in 5.2

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedissues Closed Issues
                  Reporter:
                  jaxtell Joshua Axtell (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Date of First Response:

                    Structure Helper Panel