<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>In the <a
        href="https://evolveum.com/midpoint-in-higher-education-introduction/">introductory
        blog</a> about midPoint in higher education I promised that the
      next blog post would be about relations and organizational units.
      It is taking a bit longer to finalize, but hopefully it will be
      worth it. In the meantime, let us examine the possible uses of
      archetypes in midPoint.</p>
    <p>Primary purpose of archetypes is the categorization of objects.
      One object can have only one archetype, but in the future, there
      is a plan to change that. That is why we cannot use the archetypes
      to distinguish between students and employees, because it would be
      impossible to deal with persons who are students and employees at
      the same time. Midpoint offers other ways to deal with that
      situation, but let’s focus on archetypes now.</p>
    <p>For today’s demonstration example, we will create two archetypes
      for users. One will be for academic users (e.g. students,
      professors, researchers) and the second one for non-academic users
      (e.g. support staff). Usually the academic users have some
      additional privileges (like access to academic journals),
      therefore if a user fits in both categories, we will prioritize
      the academic one. An empty archetype doesn’t do anything, so let’s
      add visual change to it straight away.</p>
    <div class="EnlighterJSWrapper classicEnlighterJSWrapper">
      <ol class="hoverEnabled classicEnlighterJS EnlighterJS">
        <li class=" odd"><span class="kw1"><archetype</span><span
            class=""> </span><span class="kw2">oid</span><span
            class="kw1">=</span><span class="st0">"d2898b9b-5a31-4b7f-a971-1215f9b95b84"</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class="">   </span><span class="kw1"><name</span><span
            class="kw1">></span><span class="">Academic User</span><span
            class="kw1"></name></span><span class=""></span></li>
        <li class=" odd"><span class="">   </span><span class="kw1"><description</span><span
            class="kw1">></span><span class="">Student, Teacher,
            Researchers, etc.</span><span class="kw1"></description></span><span
            class=""></span></li>
        <li class=" even"><span class=""></span><br>
        </li>
        <li class=" odd"><span class="">   </span><span class="kw1"><archetypePolicy</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class="">     </span><span class="kw1"><display</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" odd"><span class="">       </span><span class="kw1"><label</span><span
            class="kw1">></span><span class="">Academic user</span><span
            class="kw1"></label></span><span class=""></span></li>
        <li class=" even"><span class="">       </span><span
            class="kw1"><pluralLabel</span><span class="kw1">></span><span
            class="">Academic users</span><span class="kw1"></pluralLabel></span><span
            class=""></span></li>
        <li class=" odd"><span class="">       </span><span class="kw1"><icon</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class="">         </span><span
            class="kw1"><cssClass</span><span class="kw1">></span><span
            class="">fa fa-graduation-cap</span><span class="kw1"></cssClass></span><span
            class=""></span></li>
        <li class=" odd"><span class="">         </span><span
            class="kw1"><color</span><span class="kw1">></span><span
            class="">RoyalBlue</span><span class="kw1"></color></span><span
            class=""></span></li>
        <li class=" even"><span class="">       </span><span
            class="kw1"></icon></span><span class=""></span></li>
        <li class=" odd"><span class="">     </span><span class="kw1"></display></span><span
            class=""></span></li>
        <li class=" even"><span class="">   </span><span class="kw1"></archetypePolicy></span><span
            class=""></span></li>
        <li class=" odd"><span class=""></span><span class="kw1"></archetype></span></li>
      </ol>
    </div>
    <div class="EnlighterJSWrapper classicEnlighterJSWrapper">
      <ol class="hoverEnabled classicEnlighterJS EnlighterJS">
        <li class=" odd"><span class="kw1"><archetype</span><span
            class=""> </span><span class="kw2">oid</span><span
            class="kw1">=</span><span class="st0">"019eec6e-2bc2-4112-be40-57471d3a1490"</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class="">   </span><span class="kw1"><name</span><span
            class="kw1">></span><span class="">Non-academic users</span><span
            class="kw1"></name></span><span class=""></span></li>
        <li class=" odd"><span class="">   </span><span class="kw1"><description</span><span
            class="kw1">></span><span class="">Non-academic users
            e.g. support staff</span><span class="kw1"></description></span><span
            class=""></span></li>
        <li class=" even"><span class=""></span><br>
        </li>
        <li class=" odd"><span class="">   </span><span class="kw1"><archetypePolicy</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class="">     </span><span class="kw1"><display</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" odd"><span class="">       </span><span class="kw1"><label</span><span
            class="kw1">></span><span class="">Non-academic user</span><span
            class="kw1"></label></span><span class=""></span></li>
        <li class=" even"><span class="">       </span><span
            class="kw1"><pluralLabel</span><span class="kw1">></span><span
            class="">Non-academic users</span><span class="kw1"></pluralLabel></span><span
            class=""></span></li>
        <li class=" odd"><span class="">       </span><span class="kw1"><icon</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class="">         </span><span
            class="kw1"><cssClass</span><span class="kw1">></span><span
            class="">fa fa-user</span><span class="kw1"></cssClass></span><span
            class=""></span></li>
        <li class=" odd"><span class="">         </span><span
            class="kw1"><color</span><span class="kw1">></span><span
            class="">LimeGreen</span><span class="kw1"></color></span><span
            class=""></span></li>
        <li class=" even"><span class="">       </span><span
            class="kw1"></icon></span><span class=""></span></li>
        <li class=" odd"><span class="">     </span><span class="kw1"></display></span><span
            class=""></span></li>
        <li class=" even"><span class="">   </span><span class="kw1"></archetypePolicy></span><span
            class=""></span></li>
        <li class=" odd"><span class=""></span><span class="kw1"></archetype></span></li>
      </ol>
    </div>
    <p>As soon as we assign the archetypes to users, we will see the
      change in midPoint GUI.</p>
    <p><img class="alignnone wp-image-6827 size-full"
        src="https://evolveum.com/wp-content/uploads/allUsers.png"
        alt="" width="2138" height="571"></p>
    <p>We can even add a custom collection view to midPoint GUI. To do
      that we have to update the adminGuiConfiguration object in the
      system configuration.</p>
    <div class="EnlighterJSWrapper classicEnlighterJSWrapper">
      <ol class="hoverEnabled classicEnlighterJS EnlighterJS">
        <li class=" odd"><span class="kw1"><adminGuiConfiguration</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class="">  </span><span class="kw1"><objectCollectionViews</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span><objectCollectionView</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><identifier</span><span
            class="kw1">></span><span class="">academic-users</span><span
            class="kw1"></identifier></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><display</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class=""> </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span> </span></span></span><label</span><span
            class="kw1">></span><span class="">Academic users</span><span
            class="kw1"></label></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></display></span><span
            class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><type</span><span
            class="kw1">></span><span class="">UserType</span><span
            class="kw1"></type></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><collection</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span></span></span></span><collectionRef</span><span
            class=""> </span><span class="kw2">oid</span><span
            class="kw1">=</span><span class="st0">"d2898b9b-5a31-4b7f-a971-1215f9b95b84"</span><span
            class=""> </span><span class="kw2">type</span><span
            class="kw1">=</span><span class="st0">"ArchetypeType"</span><span
            class="kw1">/></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></collection></span><span
            class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></objectCollectionView></span><span
            class=""></span></li>
        <li class=" odd"><span class=""></span><br>
        </li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class=""></span></span><span class="kw1"><span class=""> 
            </span></span><span class="kw1"><span class=""><span
                class="">  </span></span><objectCollectionView</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><identifier</span><span
            class="kw1">></span><span class="">non-academic-users</span><span
            class="kw1"></identifier></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span></span></span></span><display</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class=""> </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class=""> </span></span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class=""><span class="">  </span> </span> </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span></span></span></span><label</span><span
            class="kw1">></span><span class="">Non-academic users</span><span
            class="kw1"></label></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span></span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class=""><span class=""></span></span></span></span></span></display></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span></span></span></span><type</span><span
            class="kw1">></span><span class="">UserType</span><span
            class="kw1"></type></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span></span></span></span><collection</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span></span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class=""><span class="">  </span></span></span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class=""><span class=""><span class=""></span></span></span></span></span></span><collectionRef</span><span
            class=""> </span><span class="kw2">oid</span><span
            class="kw1">=</span><span class="st0">"019eec6e-2bc2-4112-be40-57471d3a1490"</span><span
            class=""> </span><span class="kw2">type</span><span
            class="kw1">=</span><span class="st0">"ArchetypeType"</span><span
            class="kw1">/></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span></span></span></span></collection></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="">  </span><span
            class="kw1"><span class=""><span class=""><span class=""></span></span></span></objectCollectionView></span><span
            class=""></span></li>
        <li class=" even"><span class=""> </span><span class="">  </span><span
            class="kw1"><span class=""><span class=""></span></span></objectCollectionViews></span><span
            class=""></span></li>
        <li class=" odd"><span class=""></span><span class="kw1"></adminGuiConfiguration></span></li>
      </ol>
    </div>
    <p>After the change is applied, the new views are available in the
      menu.</p>
    <p><img class="alignnone wp-image-6831 size-full"
        src="https://evolveum.com/wp-content/uploads/collectionView.png"
        alt="" width="2142" height="761"></p>
    <p>Archetypes also offer another user-experience related
      improvement. Assignments of archetyped objects can be restricted
      based on custom rules. For example, we can create a role which
      could be assigned only to academic users.</p>
    <div class="EnlighterJSWrapper classicEnlighterJSWrapper">
      <ol class="hoverEnabled classicEnlighterJS EnlighterJS">
        <li class=" odd"><span class="kw1"><archetype</span><span
            class=""> </span><span class="kw2">oid</span><span
            class="kw1">=</span><span class="st0">"016b2ce4-7877-4633-965a-18bc9b7bc50a"</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span><name</span><span class="kw1">></span><span
            class="">Role for academic users</span><span class="kw1"></name></span><span
            class=""></span></li>
        <li class=" odd"><span class=""></span><br>
        </li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span><inducement</span><span class="kw1">></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span><description</span><span
            class="kw1">></span><span class="">Archetyped role can be
            assigned only to academic users</span><span class="kw1"></description></span><span
            class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span><assignmentRelation</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><holderType</span><span
            class="kw1">></span><span class="">UserType</span><span
            class="kw1"></holderType></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="co2"><span
              class="">  </span></span><span class="co2"><span class=""><span
                class="">  </span></span></span><span class="co2"><span
              class=""><span class=""><span class="">  </span></span></span><!--
            Academic user archetype --></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><holderArchetypeRef</span><span
            class=""> </span><span class="kw2">oid</span><span
            class="kw1">=</span><span class="st0">"d2898b9b-5a31-4b7f-a971-1215f9b95b84"</span><span
            class=""> </span><span class="kw1">/></span><span
            class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><relation</span><span
            class="kw1">></span><span class="">org:default</span><span
            class="kw1"></relation></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></assignmentRelation></span><span
            class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></inducement></span><span
            class=""></span></li>
        <li class=" odd"><span class=""></span><br>
        </li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span><assignment</span><span class="kw1">></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span><description</span><span
            class="kw1">></span><span class="">The archetype itself
            can be assigned only to roles</span><span class="kw1"></description></span><span
            class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span><assignmentRelation</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><holderType</span><span
            class="kw1">></span><span class="">RoleType</span><span
            class="kw1"></holderType></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class=""><span class="">  </span>  </span></span><span
            class="kw1"><span class=""><span class="">  </span></span><relation</span><span
            class="kw1">></span><span class="">org:default</span><span
            class="kw1"></relation></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></assignmentRelation></span><span
            class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></assignment></span><span
            class=""></span></li>
        <li class=" odd"><span class=""></span><br>
        </li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span><archetypePolicy</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span><display</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class="">  </span><label</span><span class="kw1">></span><span
            class="">Role for academic users</span><span class="kw1"></label></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class="">  </span><pluralLabel</span><span class="kw1">></span><span
            class="">Roles for academic users</span><span class="kw1"></pluralLabel></span><span
            class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class="">  </span><icon</span><span class="kw1">></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class=""> </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span> </span></span></span><cssClass</span><span
            class="kw1">></span><span class="">fa fa-graduation-cap</span><span
            class="kw1"></cssClass></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class=""> </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span> </span></span></span><color</span><span
            class="kw1">></span><span class="">SkyBlue</span><span
            class="kw1"></color></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class="">  </span></icon></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></display></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></archetypePolicy></span><span
            class=""></span></li>
        <li class=" even"><span class=""></span><span class="kw1"></archetype></span></li>
      </ol>
    </div>
    <p>Notice the difference between assignment, which is applied to the
      object itself (the archetype), and inducement, which is applied to
      the object with archetype assigned.</p>
    <p>We also prepare a role for non-academic users and a role for any
      users in a similar way. With all the parts in place, the
      configuration is already visible in GUI’s assignment tab.</p>
    <p><img class="alignnone wp-image-6829 size-full"
src="https://evolveum.com/wp-content/uploads/assignmentLimitation-open.png"
        alt="" width="1779" height="742"></p>
    <p>You can see the leftmost icon representing the role adding to
      academic users and the middle icon representing role adding to any
      user. You cannot see a button for assigning a role to non-academic
      users because this role cannot be applied to an academic user, who
      Jack Smith is (as you can see in the upper right corner). Notice
      that the “general” assignment button (the rightmost icon from
      highlighted area) is still present as it was before we have
      created the archetypes. To eliminate it and display only
      explicitly allowed relations, we have to set
      assignmentHolderRelationApproach to “closed”. That can be done
      globally or only for selected objects. We will choose the latter
      approach for now and apply it only to our academic users. This is
      how our improved Academic User Archetype looks like now:</p>
    <div class="EnlighterJSWrapper classicEnlighterJSWrapper">
      <ol class="hoverEnabled classicEnlighterJS EnlighterJS">
        <li class=" odd"><span class="kw1"><archetype</span><span
            class=""> </span><span class="kw2">oid</span><span
            class="kw1">=</span><span class="st0">"d2898b9b-5a31-4b7f-a971-1215f9b95b84"</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span><name</span><span class="kw1">></span><span
            class="">Academic User</span><span class="kw1"></name></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span><description</span><span class="kw1">></span><span
            class="">Student, Teacher, Researchers, etc.</span><span
            class="kw1"></description></span><span class=""></span></li>
        <li class=" even"><span class=""></span><br>
        </li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span><assignment</span><span class="kw1">></span><span
            class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span><description</span><span
            class="kw1">></span><span class="">The archetype itself
            can be assigned only to roles</span><span class="kw1"></description></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span><assignmentRelation</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><holderType</span><span
            class="kw1">></span><span class="">UserType</span><span
            class="kw1"></holderType></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><relation</span><span
            class="kw1">></span><span class="">org:default</span><span
            class="kw1"></relation></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></assignmentRelation></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></assignment></span><span
            class=""></span></li>
        <li class=" even"><span class=""></span><br>
        </li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span><archetypePolicy</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span><display</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><label</span><span
            class="kw1">></span><span class="">Academic user</span><span
            class="kw1"></label></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><pluralLabel</span><span
            class="kw1">></span><span class="">Academic user</span><span
            class="kw1"></pluralLabel></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span><icon</span><span
            class="kw1">></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span></span></span></span><cssClass</span><span
            class="kw1">></span><span class="">fa fa-graduation-cap</span><span
            class="kw1"></cssClass></span><span class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></span><span
            class="kw1"><span class=""><span class=""><span class=""><span
                    class="">  </span></span></span></span><color</span><span
            class="kw1">></span><span class="">RoyalBlue</span><span
            class="kw1"></color></span><span class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></span><span class="kw1"><span
              class=""><span class=""><span class="">  </span></span></span></icon></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span></display></span><span
            class=""></span></li>
        <li class=" even"><span class=""> </span><span class="kw1"><span
              class="">  </span></span><span class="kw1"><span class=""><span
                class="">  </span></span><assignmentHolderRelationApproach</span><span
            class="kw1">></span><span class="">closed</span><span
            class="kw1"></assignmentHolderRelationApproach></span><span
            class=""></span></li>
        <li class=" odd"><span class=""> </span><span class="kw1"><span
              class="">  </span></archetypePolicy></span><span
            class=""></span></li>
        <li class=" even"><span class=""></span><br>
        </li>
        <li class=" odd"><span class=""></span><span class="kw1"></archetype></span></li>
      </ol>
    </div>
    <p><img class="alignnone wp-image-6828 size-full"
src="https://evolveum.com/wp-content/uploads/assignmentLimitation-closed.png"
        alt="" width="1776" height="739"></p>
    <p>Note that the “general” assignment button is not there anymore
      and only roles for academic users and roles for any users are
      offered. In this configuration, you are not able to assign an org.
      unit to users with academic user archetype. Therefore you
      shouldn’t use the closed assignmentHolderRelationApproach until
      you have all your archetypes in place.</p>
    <p>When you click on one of new assignment buttons, you will get a
      filtered view.</p>
    <p><img class="alignnone wp-image-6830 size-full"
src="https://evolveum.com/wp-content/uploads/assignmentLimitation-roleSelect.png"
        alt="" width="1709" height="706"></p>
    <p>The assignment restriction feature in archetypes is quite handy.
      It helps midPoint administrators to keep track of which objects
      are meant to be assigned to each other. Just bear in mind this is
      only a restriction in the GUI. You can still add any relation in
      automatic processes. Also, if you change the archetype to another
      one, the existing assignments won’t be affected even though they
      might not be allowed by the new archetype. For enforcing such
      rules, midPoint has the policy rules feature.</p>
    <p>The last feature of archetypes is that they act as an abstract
      role. Therefore you can use them like any other role, meaning they
      can induce account construction or even other roles, org. units
      etc.</p>
    <p>In summary, the archetypes are a powerful feature which helps you
      to improve user experience in the midPoint GUI. Proper archetypes
      configuration will help users who only need to use the midPoint
      GUI and don’t need to have knowledge about the detailed
      configuration of roles and other objects. You can deliver a custom
      look and feel for them, including custom views and most
      importantly make sure they will assign only objects that are meant
      to be assigned that way.</p>
    <p> </p>
    <p><i>We are welcoming feedback to this blog series. Also, we are
        open to suggestions for the next topics, as long as they fit the
        overall scope. Feel free to share your ideas in the comments, on
        midPoint mailing list or any other channels.</i></p>
    <p><em>Assistance with proofreading and readability improvements
        provided by Keith Hazelton of Internet2 was greatly appreciated.</em></p>
    <p><em><br>
      </em></p>
    <p><em>(Reposted from <a
          href="https://evolveum.com/data-provenance-milestone-2/">Evolveum
          blog</a>)</em></p>
  </body>
</html>