[midPoint] Email Notification
Roman Pudil - AMI Praha a.s.
roman.pudil at ami.cz
Thu Oct 30 20:02:21 CET 2014
Hi Jason,
this code gets current plain text password in mail notifications.
midpoint.getPlaintextUserPassword(requestee);
Here is useful link about midpoint library:
https://wiki.evolveum.com/display/midPoint/Script+Expression+Functions
Regards
Roman Pudil
Roman Pudil
solution architect
gsm: [+420] 775 663 666
e-mail: roman.pudil at ami.cz <mailto:roman.pudil at ami.cz>
AMI Praha a.s.
Pláničkova 11
162 00 Praha 6
tel./fax: [+420] 274 783 239
web: www.ami.cz <http://www.ami.cz>
AMI Praha a.s.
<http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management>
Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za
společnost AMI Praha a.s.
jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít
výhradně písemnou formu.
Dne 30.10.2014 v 19:39 Jason Everling napsal(a):
> I got this down, I had to figure out where and what these were for
> \n\n but I was able to add a ton of information that was needed.
>
> I need to add in the password and Employee Number which is actually
> the student ID,
>
> Is this correct, I couldn't find much on the subject,
>
> Your Password is " + requestee?.getPassword()?.getOrig()
> Your Student ID is " + requestee?.getEmployeeNumber()?.getOrig()
>
> Thanks for all your help!
>
> On Wed, Oct 29, 2014 at 3:07 PM, Jason Everling <jeverling at bshp.edu
> <mailto:jeverling at bshp.edu>> wrote:
>
> Ohh I see, Thanks!
>
> JASON
>
> On Wed, Oct 29, 2014 at 3:01 PM, Ivan Noris
> <ivan.noris at evolveum.com <mailto:ivan.noris at evolveum.com>> wrote:
>
> Hi Jason,
>
> On 10/29/2014 07:26 PM, Jason Everling wrote:
>> Not that one, that one works just fine but if I try to add to
>> it is when it fails, like
>>
>> <bodyExpression>
>> <script>
>> <code>
>> Welome to blah blah, the following below are
>> links to the various resources you will use here
>> Your Username is + requestee?.getName()?.getOrig()
>>
>> You should login and should your password
>> at http://www.example/com
>>
>> Link 1
>> Link 2
>> Link 3
>> </code>
>> </script>
>> </bodyExpression>
>>
>
> I see. But the answer is very simple: everything in <code> is
> a groovy expression. Return value of this expression is what
> will be used for e-mail body (in this case).
>
> For example in my previous sample, the Groovy expression
> "[IDM] Your username is: " + requestee?.getName()?.getOrig()
> is actually the same as:
>
> return *"*[IDM] Your username is: *"* *+*
> requestee?.getName()?.getOrig()
>
> In your case, you are missing:
> 1) quotes for strings
> 2) + operator for concatenating strings
>
> So your example needs to be rewritten to maintain your
> required formatting, as:
>
> <bodyExpression>
> <script>
> <code>
> "Welome to blah blah, the following below
> are links to the various resources you will use here. \n" +
> "Your Username is " + requestee?.getName()?.getOrig() + "\nYou
> should login and should your password at http://www.example/com"
> </code>
> </script>
> </bodyExpression>
>
> (this is a copy/paste from actual System Configuration)
>
> Which will produce notification for example:
>
> Welome to blah blah, the following below are links to the
> various resources
> you will use here.
> Your Username is hulahop
> You should login and should your password at
> http://www.example/com
>
> (this is copy/paste from actual e-mail that was sent).
>
> So now you should be able to do anything (except the HTML
> discussed earlier).
>
> Regards,
> Ivan
>
>> On Wed, Oct 29, 2014 at 1:18 PM, Ivan Noris
>> <ivan.noris at evolveum.com <mailto:ivan.noris at evolveum.com>> wrote:
>>
>> Hi Jason,
>>
>> so the following didn't work for you? It looks ok at the
>> first look.
>>
>> Do you get any exception when sending notifications?
>> Errors in log? What precisely "does not work"? I'll try
>> to replicate the behaviour. But please send the whole
>> notification handler which does not work. Thank you.
>>
>>> <bodyExpression>
>>> <script>
>>> <code>
>>> "[IDM] Your username is: " + requestee?.getName()?.getOrig()
>>> </code>
>>> </script>
>>> </bodyExpression>
>>
>> Regards,
>> Ivan
>>
>> --
>> Ing. Ivan Noris
>> Senior Identity Management Engineer
>> evolveum.com <http://evolveum.com>
>> ___________________________________________
>> "Idem per idem - semper idem Vix."
>>
>>
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> <mailto:midPoint at lists.evolveum.com>
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
>>
>>
>>
>>
>> CONFIDENTIALITY NOTICE:
>> This e-mail together with any attachments is proprietary and
>> confidential; intended for only the recipient(s) named above
>> and may contain information that is privileged. You should
>> not retain, copy or use this e-mail or any attachments for
>> any purpose, or disclose all or any part of the contents to
>> any person. Any views or opinions expressed in this e-mail
>> are those of the author and do not represent those of the
>> Baptist School of Health Professions. If you have received
>> this e-mail in error, or are not the named recipient(s), you
>> are hereby notified that any review, dissemination,
>> distribution or copying of this communication is prohibited
>> by the sender and to do so might constitute a violation of
>> the Electronic Communications Privacy Act, 18 U.S.C. section
>> 2510-2521. Please immediately notify the sender and delete
>> this e-mail and any attachments from your computer.
>>
>>
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com <mailto:midPoint at lists.evolveum.com>
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>
> --
> Ing. Ivan Noris
> Senior Identity Management Engineer
> evolveum.com <http://evolveum.com>
> ___________________________________________
> "Idem per idem - semper idem Vix."
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com <mailto:midPoint at lists.evolveum.com>
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
>
>
>
>
>
> CONFIDENTIALITY NOTICE:
> This e-mail together with any attachments is proprietary and
> confidential; intended for only the recipient(s) named above and may
> contain information that is privileged. You should not retain, copy or
> use this e-mail or any attachments for any purpose, or disclose all or
> any part of the contents to any person. Any views or opinions
> expressed in this e-mail are those of the author and do not represent
> those of the Baptist School of Health Professions. If you have
> received this e-mail in error, or are not the named recipient(s), you
> are hereby notified that any review, dissemination, distribution or
> copying of this communication is prohibited by the sender and to do so
> might constitute a violation of the Electronic Communications Privacy
> Act, 18 U.S.C. section 2510-2521. Please immediately notify the sender
> and delete this e-mail and any attachments from your computer.
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20141030/3e1711e0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ami_logo.gif
Type: image/gif
Size: 2900 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20141030/3e1711e0/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AMI-podpis-IdM_1.png
Type: image/png
Size: 21628 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20141030/3e1711e0/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3924 bytes
Desc: Elektronicky podpis S/MIME
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20141030/3e1711e0/attachment.bin>
More information about the midPoint
mailing list