title: Alfresco Share - Dynamic rendering of fields in a form
body: <p>My question is more or less in the title, I added a new data type in my data model.</p>
  
  <pre><code>&lt;type name="moi:montype"&gt;
    &lt;title&gt;titre type&lt;/title&gt;
    &lt;parent&gt;cm:content&lt;/parent&gt;
    &lt;mandatory-aspects&gt;
      &lt;aspect&gt;moi:monaspect&lt;/aspect&gt;
    &lt;/mandatory-aspects&gt;
  &lt;/type&gt;
  </code></pre>
  
  <p>This one uses a new aspect in which I added a new field</p>
  
  <pre><code>&lt;aspect name="moi:monaspect"&gt;
    &lt;title&gt;titre aspect&lt;/title&gt;
    &lt;properties&gt;
      &lt;property name="moi:monchamp"&gt;
        &lt;type&gt;d:text&lt;/type&gt;
        &lt;mandatory&gt;false&lt;/mandatory&gt;
      &lt;/property&gt;
      ...
    &lt;/properties&gt;
  &lt;/aspect&gt;
  </code></pre>
  
  <p>I then displayed this new field in a Share form by editing the file share-config-custom.xml.</p>
  
  <pre><code>&lt;config evaluator="node-type" condition="moi:montype"&gt;
    &lt;forms&gt;
      &lt;form&gt;
        &lt;field-visibility&gt;
          &lt;show id="moi:monchamp"/&gt;
          ...
        &lt;/field-visibility&gt;
        &lt;appearance&gt;
          &lt;field id="moi:monchamp" label="Champ texte" /&gt;
          ...
        &lt;/appearance&gt;
      &lt;/form&gt;
    &lt;/forms&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>Till then, I could test my changes and the new field displays well.
  But I would like to go further, and condition for example the display of the field depending on the logged in user's group.
  If the logged in user is part of the "priviledged group", then the field is displayed, otherwise it will not, or only in read only mode.</p>
  
  <p>Do you think we can do this ? And how ?
  I looked at documentation, but can't find my happiness.
  I don't ask for the full solution, but for tips to follow.</p>
  
  <p>Thank you for your help.</p>