<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Peter,<br>
<br>
you need to add reference for the object template to the
systemConfiguration:<br>
<br>
this should be in your system configuration object:<br>
<br>
<defaultObjectPolicyConfiguration><br>
<type>UserType</type><br>
<objectTemplateRef
oid="10000000-0000-0000-0000-000000000223"
type="ObjectTemplateType"><!-- User Object Template for
Mandatory Fields --></objectTemplateRef><br>
</defaultObjectPolicyConfiguration><br>
<br>
Or you can use GUI: <br>
<ol>
<li>Go to the Configuration -> Basic</li>
<li>Find 'Object Policies'</li>
<li>Click on 'Edit' <br>
</li>
<li>Set 'Object type' to UserType and choose your object
template</li>
<li>Save</li>
</ol>
<p>Best regards,<br>
Katarina Valalikova<br>
</p>
<br>
<br>
<br>
Dňa 7. 8. 2015 o 12:01 Petr Gašparík napísal(a):<br>
</div>
<blockquote
cite="mid:CAFmDq45NRFub9Fdv4=X5ZRbG2KdYQY790nmfRpmDs7R3O2TWHw@mail.gmail.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi Katka,
<div>I am using midPoint 3.1.1</div>
<div><br>
</div>
<div>There were no Object templates in repository, so I created
new one. Is there something else I need to do to turn it on?
Becauase it is not making hese fields mandatory.</div>
<div><br>
</div>
<div>Source:</div>
<div>
<div><objectTemplate xmlns="<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>"</div>
<div> xmlns:icfs="<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3">http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3</a>"</div>
<div> xmlns:t="<a moz-do-not-send="true"
href="http://prism.evolveum.com/xml/ns/public/types-3">http://prism.evolveum.com/xml/ns/public/types-3</a>"</div>
<div> xmlns:c="<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>"</div>
<div> xmlns:q="<a moz-do-not-send="true"
href="http://prism.evolveum.com/xml/ns/public/query-3">http://prism.evolveum.com/xml/ns/public/query-3</a>"</div>
<div> xmlns:ri="<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">http://midpoint.evolveum.com/xml/ns/public/resource/instance-3</a>"</div>
<div>
oid="10000000-0000-0000-0000-000000000223"</div>
<div> version="0"></div>
<div> <name>User Object Template for Mandatory
Fields</name></div>
<div> <metadata></div>
<div>
<createTimestamp>2015-08-07T09:43:38.605Z</createTimestamp></div>
<div> <creatorRef
oid="00000000-0000-0000-0000-000000000002"
type="c:UserType"><!-- administrator
--></creatorRef></div>
<div> <createChannel><a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/model/channels-3#objectImport">http://midpoint.evolveum.com/xml/ns/public/model/channels-3#objectImport</a></createChannel></div>
<div> </metadata></div>
<div> <item></div>
<div> <c:ref>c:givenName</c:ref></div>
<div> <limitations></div>
<div> <layer>presentation</layer></div>
<div> <minOccurs>1</minOccurs></div>
<div> </limitations></div>
<div> </item></div>
<div> <item></div>
<div> <c:ref>c:familyName</c:ref></div>
<div> <limitations></div>
<div> <layer>presentation</layer></div>
<div> <minOccurs>1</minOccurs></div>
<div> </limitations></div>
<div> </item></div>
<div> <item></div>
<div> <c:ref>c:fullName</c:ref></div>
<div> <limitations></div>
<div> <layer>presentation</layer></div>
<div> <minOccurs>1</minOccurs></div>
<div> </limitations></div>
<div> </item></div>
<div> <item></div>
<div> <c:ref>c:emailAddress</c:ref></div>
<div> <limitations></div>
<div> <layer>presentation</layer></div>
<div> <minOccurs>1</minOccurs></div>
<div> </limitations></div>
<div> </item></div>
<div> <mapping/></div>
<div></objectTemplate></div>
<div><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">čt 6. 8. 2015 v 15:16 odesílatel Katarina
Valalikova <<a moz-do-not-send="true"
href="mailto:k.valalikova@evolveum.com">k.valalikova@evolveum.com</a>>
napsal:<br>
</div>
<blockquote class="gmail_quote">
<div>
<div>Hi Peter,<br>
<br>
which version of midPoint are you using? I'm asking
because from the version 3.1.1 it is not necessary to
modify midpoint's schemas dirrectly. You can do it in
runtime environment using object template. In my
opinion this is better way for customization as you
can do it without rebuilding and redeploying midPoint
with every other change. The example configuration is
bellow:<br>
<br>
<objectTemplate xmlns=<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a><br>
xmlns:c=<a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a><br>
oid="10000000-0000-0000-0000-000000000000"><br>
<name>User Template</name><br>
<mapping><br>
<!-- this is a section where you
can have your mappings --><br>
</mapping><br>
<br>
<!-- here start the section for 'schema override'
--><br>
<item><br>
<ref>c:additionalName</ref>
<!-- the name of the schema attribute
you want to modify --><br>
<limitations><br>
<b><layer>presentation</layer>
</b> <!-- layer has to be set to
presentation - this will provide checks on the GUI
layer --><b><br>
</b><b> <ignore>true</ignore></b>
<!-- completely hides this
attribute in GUI --><br>
</limitations><br>
</item><br>
<br>
<item><br>
<ref>c:name</ref><br>
<limitations><br>
<b><layer>presentation</layer></b><b><br>
</b><b>
<minOccurs>1</minOccurs></b>
<!-- this makes the field mandatory --><br>
</limitations><br>
</item><br>
<br>
<!-- end of the 'schema override' section --><br>
<br>
<br>
Hope this helps you.<br>
<br>
Best Regards,<br>
Katarina Valalikova<br>
<br>
<br>
Dňa 6. 8. 2015 o 14:43 Petr Gašparík napísal(a):<br>
</div>
</div>
<div>
<blockquote type="cite">
<div dir="ltr">Hi,
<div>I customized common-3.xsd - minOccurs="1" in
scheme jar to make attributes mandatory.</div>
<div><br>
</div>
<div>Now, input fields has red asterisk but midPoint
is not taking care about that and allows empty
values.</div>
<div><br>
</div>
<div>What I am missing? Thanks!<br>
</div>
<div>Any answer is appreciated, we run PoC right
now..</div>
<div><br>
</div>
<div>beste regards, Petr G.</div>
</div>
<div dir="ltr">-- <br>
</div>
<div dir="ltr">--
<div>Petr G.</div>
</div>
<br>
<fieldset></fieldset>
<br>
</blockquote>
</div>
<div>
<blockquote type="cite">
<pre>_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
midPoint mailing list<br>
<a moz-do-not-send="true"
href="mailto:midPoint@lists.evolveum.com"
target="_blank">midPoint@lists.evolveum.com</a><br>
<a moz-do-not-send="true"
href="http://lists.evolveum.com/mailman/listinfo/midpoint"
rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</blockquote>
</div>
</div>
</div>
<div dir="ltr">-- <br>
</div>
<div dir="ltr">--
<div>Petr G.</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
</body>
</html>