Skip to content

Commit

Permalink
schrodinger: test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Feb 8, 2021
1 parent ce97f75 commit 8b8e110
Showing 1 changed file with 0 additions and 139 deletions.
Expand Up @@ -687,143 +687,4 @@
</class>
</permissionProfile>
</expressions>
<notificationConfiguration>
<handler>
<simpleUserNotifier>
<recipientExpression>
<value>idm@example.com</value>
</recipientExpression>
<subjectExpression>
<script><code>
if (event.isSuccess())
tmpText = "[IDM] SUCCESS: User " + event.getChangeType() + " operation succeeded for "
else if (event.isFailure())
tmpText = "[IDM] ERROR: User " + event.getChangeType() + " operation failed for "
else tmpText = "[IDM] IN PROGRESS: User " + event.getChangeType() + " operation in progress for "

tmpText + requestee?.getName()?.getOrig()
</code></script>
</subjectExpression>
<transport>mail</transport>
</simpleUserNotifier>
</handler>
<handler>
<simpleResourceObjectNotifier>
<name>Notify system administrator for accounts</name>
<recipientExpression>
<value>idm@example.com</value>
</recipientExpression>
<subjectExpression>
<script><code>
import com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowKindType;

if (event?.isShadowKind(ShadowKindType.ACCOUNT)) tmpObject = 'account '
else tmpObject = 'resource object (not account) '

if (event.isSuccess())
tmpText = "[IDM] SUCCESS: " + tmpObject + event?.getChangeType() + " operation succeeded"
else if (event.isFailure())
tmpText = "[IDM] ERROR: " + tmpObject + event?.getChangeType() + " operation failed"
else tmpText = "[IDM] IN PROGRESS: " + tmpObject + event?.getChangeType() + " operation in progress"

if (tmpObject == 'account ') return tmpText + ' for ' + requestee?.getName()?.getOrig()
else return tmpText
</code></script>
</subjectExpression>
<transport>mail</transport>
</simpleResourceObjectNotifier>
</handler>

<!-- ******************************************* -->
<handler>
<simpleFocalObjectNotifier>
<focusType>RoleType</focusType>
<name>Notify system administrator for role change</name>
<recipientExpression>
<value>idm@example.com</value>
</recipientExpression>
<bccExpression>
<value>idm-bcc@example.com</value>
</bccExpression>
<subjectExpression>
<script><code>
tmpObject = 'Role '

if (event.isSuccess())
tmpText = "[IDM] SUCCESS: " + tmpObject + event?.getChangeType() + " operation succeeded"
else if (event.isFailure())
tmpText = "[IDM] ERROR: " + tmpObject + event?.getChangeType() + " operation failed"
else tmpText = "[IDM] IN PROGRESS: " + tmpObject + event?.getChangeType() + " operation in progress"

return tmpText
</code></script>
</subjectExpression>
<transport>mail</transport>
</simpleFocalObjectNotifier>
</handler>
<handler>
<simpleFocalObjectNotifier>
<focusType>OrgType</focusType>
<name>Notify system administrator for organization change</name>
<recipientExpression>
<value>idm@example.com</value>
</recipientExpression>
<subjectExpression>
<script><code>
tmpObject = 'Organization '

if (event.isSuccess())
tmpText = "[IDM] SUCCESS: " + tmpObject + event?.getChangeType() + " operation succeeded"
else if (event.isFailure())
tmpText = "[IDM] ERROR: " + tmpObject + event?.getChangeType() + " operation failed"
else tmpText = "[IDM] IN PROGRESS: " + tmpObject + event?.getChangeType() + " operation in progress"

return tmpText
</code></script>
</subjectExpression>
<transport>mail</transport>
</simpleFocalObjectNotifier>
</handler>
<handler>
<simpleWorkflowNotifier>
<transport>mail</transport>
</simpleWorkflowNotifier>
</handler>
<handler>
<simpleTaskNotifier>
<recipientExpression>
<value>idm@example.com</value>
</recipientExpression>
<transport>mail</transport>
<operation>delete</operation> <!-- DELETE means finishing task handler execution -->
<category>taskEvent</category>
<expressionFilter>
<script> <!-- any situation that results in the task being suspended -->
<code>event.isPermanentError()</code>
</script>
</expressionFilter>
</simpleTaskNotifier>
</handler>
<handler>
<accountPasswordNotifier>
<name>New accounts in midPoint managed systems</name>
<operation>add</operation>
<status>success</status>
<recipientExpression>
<value>administrator@example.com</value>
</recipientExpression>
<subjectExpression>
<script><code>"[IDM] New account created by IDM for user: " + requestee?.getName()?.getOrig()</code></script>
</subjectExpression>
<transport>mail</transport>
</accountPasswordNotifier>
</handler>
<!-- ******************************************* -->
<mail>
<defaultFrom>idm@example.com</defaultFrom>
<debug>false</debug>
<!-- REDIRECT -->
<redirectToFile>/opt/training/midpoint-labs/example-mail-notifications.log</redirectToFile>
</mail>
</notificationConfiguration>
</systemConfiguration>

0 comments on commit 8b8e110

Please sign in to comment.