<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Yakov,</p>
<p>I was using this for something similar (only members, not
managers should have a group association given by a metarole in
organization unit):</p>
<p> <condition><br>
<script><br>
<code><br>
/* fixes MID-5538 as relation may be null in some waves.<br>
Checking just for ORG_DEFAULT does not work in such cases. This
method works even if the relation is null.<br>
<br>
Credits to P. Mederly<br>
*/<br>
<br>
targetRef != null &&<br>
<font color="#1b70e5">midpoint.relationRegistry.isMember(targetRef.relation)</font>
&&<br>
<font color="#ffa348"> !midpoint.relationRegistry.isManager(targetRef.relation)</font><br>
</code><br>
</script><br>
</condition><br>
</p>
<p>I was using this condition in my association/outbound element in
metarole, but you can try it for your case as well.</p>
<p>The original author of this example is noted in the comments :-)</p>
<p>NOTE: I last used/tested this with midPoint 4.4.something.<br>
</p>
<p>Best regards,</p>
<p>Ivan<br>
</p>
<div class="moz-cite-prefix">On 22. 1. 2023 17:08, Yakov Revyakin
via midPoint wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALXvSnubc89E+uuaky2qB5Ks7VF46zmBhZWmL+3QgAXhATo6GQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi friends,
<div>I have a question about how to assign something a bit
unusual.</div>
<div><br>
There is an Org with 2 users. User1 is a member of the Org,
User2 is a manager of the Org but isn't a member of it.
<div>There is a BusinessRole which induces an IT Role to
order=2 users. </div>
<div><br>
</div>
<div>I'm assigning the BusinessRole to the Org. User1 &
User2 are order 2 users related to the Business Role
(correct?).</div>
<div><br>
</div>
<div>Is it possible to differentiate User1 (a member) and
User2 (a manager) during assigning the IT Role which happens
as result of assigning the BusinessRole to the Org?</div>
<div><br>
</div>
<div>So, I'd like to assign the BusinessRole to the Org and
have the IT Role assigned to members of the Org only
(User1).</div>
<div><br>
</div>
<div>Thanks in advance,</div>
<div>J </div>
<div><br>
</div>
<div> </div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-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="https://lists.evolveum.com/mailman/listinfo/midpoint">https://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Ivan Noris
Expert Identity Engineer
evolveum.com
</pre>
</body>
</html>