<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello Mariano,</p>
<p>you need two things:</p>
<p>1) Teach your ScriptedSQL resource how to deal with entitlements.
This requires custom groovy code (as anything in ScriptedSQL
connector). I don't have any at hand; but I'm sure many people on
this list have done so.<br>
2) Configure midPoint in such a way that midPoint roles that
correspond to your groups have the following:<br>
- assignment to your resource that would cause the <i>group</i>
object to be created for the role<br>
- inducement to your resource that would cause creation of <i>user-group</i>
relation (this is called the entitlement) when a user has the role
assigned</p>
<p>As for #2, you can see e.g. <a
href="https://wiki.evolveum.com/display/midPoint/Entitlements">https://wiki.evolveum.com/display/midPoint/Entitlements</a>.</p>
<p>Best regards,<br>
</p>
<pre class="moz-signature" cols="72">Pavol Mederly
Software developer
evolveum.com
</pre>
<div class="moz-cite-prefix">On 05.09.2016 19:05, mariano marron
wrote:<br>
</div>
<blockquote
cite="mid:CALrFv6kS8OFzUUfb=s_=rdd0eycA_1EiWNvt2ZiP4sknZxVy8A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>Hi everyone! I have the following issue.<br>
</div>
I have a scripted sql resource, and a data base with three
tables: users (pk: userid), groups (pk: groupid) and
usergroups (two foreign keys: userid and groupid from the
other tables). I am able to create users in the users table
with the resource, and groups in the groups table too. What I
would need to do is to create an entry on the usergroups table
based on the user getting an assignment, using the userid and
the groupid. Can anyone explain to me how the resource should
be configured in order to do this, if possible? Thank you very
much!<br>
<br>
</div>
Mariano<br>
</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>