[midPoint] Modifying Labels of Default-Fields
Ivan Noris
ivan.noris at evolveum.com
Tue Feb 21 12:15:39 CET 2023
Hi Florian,
you can do this without any source code modification using object template.
Please create object template object similar to this:
<objectTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
oid="f1037036-b1d7-11ed-ac9a-377757307596">
<name>ExAmPLE User Template</name>
<item>
<ref>telephoneNumber</ref>
<displayName>This is my telephone number</displayName>
<emphasized>true</emphasized>
<help>Mobile Telephone Number</help>
</item>
...
</objectTemplate>
This object template overrides the default telephoneNumber attribute to
be displayed as "This is my telephone number", with tooltip "Mobile
telephone number". Emphasized means the attribute will be displayed even
when empty.
To use the object template, you need to reference it in midPoint's
System configuration.
From GUI: go to System > Policies, and add a Object Policy for UserType
refering to your template.
From XML - when using Studio: this is the System configuration fragment
needed:
<defaultObjectPolicyConfiguration>
<objectTemplateRef type="ObjectTemplateType"
oid="f1037036-b1d7-11ed-ac9a-377757307596"/>
<type>UserType</type>
</defaultObjectPolicyConfiguration>
No restart is required.
For other attributes than telephoneNumber, you can see their names
defined in common schema. For midpoint 4.6 it's here:
https://www.evolveum.com/downloads/midpoint/4.6/midpoint-4.6-schemadoc/http---midpoint-evolveum-com-xml-ns-public-common-common-3/object/UserType.html
(Attribute givenName represents the user's given name.)
Best regards,
Ivan
On 21. 2. 2023 10:46, Florian Dürr via midPoint wrote:
>
> Hi @all
>
> My Goal is to adapt the labels of the properties of the default
> user-edit form, i.e. instead of “Given name” I like it to say “First
> name”.
>
> I am quite new to midPoint and (unsuccessfully) searched the
> documentation for 3 hours before posting this.
>
> I am using midPoint-Studio and search for a way to do it with editing
> XMLs; preferably not a way which involves recompilation.
>
> Thanks a lot for pointing me into the right direction,
>
> Best,
>
> Florian
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> https://lists.evolveum.com/mailman/listinfo/midpoint
--
Ivan Noris
Expert Identity Engineer
evolveum.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20230221/88916a06/attachment.htm>
More information about the midPoint
mailing list