cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying mandatory-aspects

jawz
Champ in-the-making
Champ in-the-making
I have a type that has a mandatory-aspect "cm:versionable" being used.  The problem I have is that the global properties set in contentModel.xml has autoVersioning set to true and one of my users needs it set to fals.  I do not see anywhere that anyone is setting the properties in the <mandatory-aspects> tag.  Below is an example:

What I have:
   <type name="my:form">
      <title>My Form</title>
        …

      <mandatory-aspects>
        <aspect>cm:versionable</aspect>
      </mandatory-aspects>
    </type>
  </types>
</model>

Will the following work, is it advised, or what is the correct way to do this?
 <type name="my:form">
      <title>My Form</title>
        …

      <mandatory-aspects>
        <aspect>cm:versionable</aspect>
            <property name="cm:autoVersionOnUpdateProps">
               <title>Auto Version - on update properties only</title>
               <type>d:boolean</type>
               <default>false</default>
            </property>
      </mandatory-aspects>
    </type>
  </types>
</model>[/

Thanks
1 REPLY 1

mitpatoliya
Star Collaborator
Star Collaborator
The way you are trying to do will not work for sure.
It will not override the property it will give error on startup itself.

Logically when you are attaching the aspect versionable that means you are allowing versioning for that document.
So,in your case what you can do is for the particular user which you do not want that aspect remove that aspect for all the documents uploaded by that user.
Also remember it is document based property.