[midPoint] Modifying Labels of Default-Fields

Florian Dürr florian.duerr at itconcepts.ch
Tue Feb 21 14:19:48 CET 2023


Thank you Ivan and Stefano

Worked perfectly.

Best,
Florian


Von: midPoint <midpoint-bounces at lists.evolveum.com> Im Auftrag von Ivan Noris via midPoint
Gesendet: Dienstag, 21. Februar 2023 12:16
An: midpoint at lists.evolveum.com
Cc: Ivan Noris <ivan.noris at evolveum.com>
Betreff: Re: [midPoint] Modifying Labels of Default-Fields

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
mailto:midPoint at lists.evolveum.com
https://lists.evolveum.com/mailman/listinfo/midpoint
-- 
Ivan Noris
Expert Identity Engineer
evolveum.com


More information about the midPoint mailing list