title: Customize field authorization in Spring
body: <p>In Spring Security, I have a text field that is surrounded by an authorize tag. I want to customize this authorization which can be authorized just in Edit mode. In fact, the user that has this role can only see this field in Insert mode.</p>
  
  <p>If the object is transient, this field should be active, and if the object is persistent, this field should be inactive or invisible.</p>
  
  <p>This is my code:</p>
  
  <pre><code>&lt;security:authorize  url="/naturalPersonIdentifier.jsf"&gt;
  &lt;v:suggestTextEntry id="identifier"
                          maxResultNumber="5"
                          required="true"
                          text="#{naturalPersonBean.naturalPerson.identifier}"
  &lt;/v:suggestTextEntry&gt;
  &lt;/security:authorize&gt;
  </code></pre>