<systemConfiguration>
<adminGuiConfiguration>
<objectCollectionViews>
<objectCollectionView>
<identifier>managers-view</identifier>
<description>Managers</description>
<documentation>This view displays all users with relation "Manager" assignment</documentation>
<display>
<label>Managers</label>
<singularLabel>Manager</singularLabel>
<tooltip>All managers in system</tooltip>
<icon>
<cssClass>fa fa-user-tie</cssClass>
</icon>
</display>
<displayOrder>10</displayOrder>
<type>UserType</type>
<collection>
<filter>
<q:text>assignment/targetRef matches ( relation = manager and targetType = OrgType )</q:text>
</filter>
</collection>
</objectCollectionView>
</objectCollectionViews>
</adminGuiConfiguration>
</systemConfiguration>
Add custom quick search filters
|
Object collection and view feature
This page describes Object collection and view midPoint feature.
Please see the feature page for more details.
|
Have you ever wondered how to configure a custom element in the search bar? Below, you can see how to embed a custom object collection with a user query query into the search panel and the main navigation.
Use case
The example task is to filter out an organization managers and make the filter easily accessible in the midPoint GUI.
You have two ways of addressing the task.
1. Custom collection under Users in the main navigation
Create a new objectCollectionView dedicated to displaying only accounts that are managers of an organization.
This way, you create a new category under "Users" that will show only such users.
Add this configuration to the midPoint system configuration.
2. Custom quick search filter
Create a new search panel item dedicated to filtering only accounts that are managers of an organization.
If you want to use this quick search filter for a custom collection (under Users, e.g., Persons, etc.), take the <searchBoxConfiguration> part of code and put it to desired objectCollectionView
|
Put the code into the system configuration.
...
<objectCollectionView>
<type>UserType</type>
<identifier>allUsers</identifier>
<searchBoxConfiguration>
<searchItems>
<searchItem>
<filter>
<q:text>assignment/targetRef matches ( relation = manager and targetType = OrgType )</q:text>
</filter>
<display>
<label>Show managers only</label>
</display>
<visibleByDefault>true</visibleByDefault>
</searchItem>
</searchItems>
</searchBoxConfiguration>
</objectCollectionView>
...
For better filtering, you can use roleMembershipRef matches ( relation = manager ) query to list all managers who got their role with relation:manager indirectly (from inducement)
|