<div dir="ltr">Hi Aivo,<div><br></div><div>I created in one project extension/<wbr>overrideAdministrativeStatus user schema extension and when it is enabled or disabled, I use this value over object template user, elsewhere keep as is from activation/<wbr>administrativeStatus.</div><div><br></div><div><div>            <xsd:element name="<wbr>overrideAdministrativeStatus" type="c:ActivationStatusType" minOccurs="0"></div><div>                <xsd:annotation></div><div>                    <xsd:appinfo></div><div>                        <a:indexed>true</a:indexed></div><div>                        <a:displayName>Override Administrative status</a:displayName></div><div>                        <a:displayOrder>900</a:<wbr>displayOrder></div><div>                    </xsd:appinfo></div><div>                    <xsd:documentation></div><div>                        If this is filled, override administrative status from HR calculated from status.</div><div>                        If you use this, please write to description a reason, why you do this (for example: She works on maternity leave). </div><div>                    </xsd:documentation></div><div>                </xsd:annotation></div><div>            </xsd:element></div></div><div><br></div><div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">  </span><mapping></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">               </span><name>Override administrative status if needed</name></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">             </span><strength>strong</strength></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">               </span><source></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span><path>$user/activation/<wbr>administrativeStatus</path></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">             </span></source></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">               </span><source></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span><path>$user/extension/<wbr>overrideAdministrativeStatus</<wbr>path></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">           </span></source></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">               </span><expression></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">                    </span><script></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">                                </span><code></div><div>                <span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>if (overrideAdministrativeStatus!<wbr>=null) {</div><div>                <span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">         </span>return overrideAdministrativeStatus;</div><div>                <span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>}</div><div>                    return administrativeStatus;</div><div>                </code></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">                        </span></script></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">               </span></expression></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">           </span><target> <!-- need both administrativeStatus & effectiveStatus also --></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">                       </span><path>$user/activation/<wbr>administrativeStatus</path></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">             </span></target></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">               </span><condition></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">                     </span><script></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">                                </span><language><a href="http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy" target="_blank">http://midpoint.<wbr>evolveum.com/xml/ns/public/<wbr>expression/language#Groovy</a></<wbr>language></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">                           </span><code><wbr>overrideAdministrativeStatus !=null</code></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">                       </span></script></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">               </span></condition></div><div><span class="gmail-m_-4825903369038130340gmail-Apple-tab-span" style="white-space:pre-wrap">    </span></mapping></div></div><div><br></div><div><br></div><div>Best regards,</div><div><br></div><div>Gustav</div><div><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div class="gmail_extra"><div class="gmail_quote"><div><div class="gmail-h5">2017-01-16 8:32 GMT+01:00 Aivo Kuhlberg <span dir="ltr"><<a href="mailto:aivo.kuhlberg@rmit.ee" target="_blank">aivo.kuhlberg@rmit.ee</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5">




<div dir="ltr" style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:calibri,arial,helvetica,sans-serif">
<p>Hi,<br>
</p>
<p>I want to implement midPoint user activation mechanism based on HR resource user account field value with manual GUI override possibility. When the HR resource field "status" has value "WRS" (work relationship stopped) then the midPoint user should be disabled,
 otherwise user should be enabled. However, I need also possibility to manually override current midPoint user activation value.<br>
I tried implemented inbound activation for HR resource (like <a href="https://github.com/Evolveum/midpoint/blob/master/samples/demo/hr.xml" target="_blank">https://github.com/Evolveum/mi<wbr>dpoint/blob/master/samples/dem<wbr>o/hr.xml</a>) and it works - When I set HR user status to value "WRS" then midPoint user's administrative status is changed to state Disabled.
 I can also manually enable disabled user if needed in administration GUI. But the problem here is that both HR resource and admin gui have the same access to user's administrativeStatus value - I can change the user status in GUI but whenever the HR user data
 is changed then it changes also administrativeStatus back to value depanding on status field. Any ideas, how should I implement disabling/enabling of user based on HR data with manual user activation override possibility?<br>
Thanks,<br>
Aivo Kuhlberg<br>
</p>
<br>
<hr>
<font face="Arial" color="Gray" size="2">Käesolev e-kiri võib sisaldada asutusesiseseks kasutamiseks tunnistatud teavet.<br>
This e-mail may contain information which is classified for official use.</font>
</div>

<br></div></div>______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mail<wbr>man/listinfo/midpoint</a><br>
<br></blockquote></div><span class="gmail-HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_-4825903369038130340gmail_signature">s pozdravom<div><br></div><div>Gustáv Pálos</div></div>
</font></span></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Gustáv Pálos</div><div>Identity Engineer</div><a href="http://evolveum.com/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">evolveum.com</a><br></div></div>
</div></div>