lemonldap-ng/doc/pages/documentation/current/notifications.html
Clément Oudot a38386f0cd New doc
2016-10-15 17:57:04 +00:00

410 lines
24 KiB
HTML

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8" />
<title>documentation:2.0:notifications</title>
<meta name="generator" content="DokuWiki"/>
<meta name="robots" content="index,follow"/>
<meta name="keywords" content="documentation,2.0,notifications"/>
<link rel="search" type="application/opensearchdescription+xml" href="lib/exe/opensearch.html" title="LemonLDAP::NG"/>
<link rel="start" href="notifications.html"/>
<link rel="contents" href="notifications.html" title="Sitemap"/>
<link rel="stylesheet" type="text/css" href="lib/exe/css.php.t.bootstrap3.css"/>
<link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.min.css"/>
<script type="text/javascript">/*<![CDATA[*/var NS='documentation:2.0';var JSINFO = {"id":"documentation:2.0:notifications","namespace":"documentation:2.0"};
/*!]]>*/</script>
<script type="text/javascript" charset="utf-8" src="lib/exe/js.php.t.bootstrap3.js"></script>
</head>
<body>
<div class="dokuwiki export container">
<!-- TOC START -->
<div id="dw__toc">
<h3 class="toggle">Table of Contents</h3>
<div>
<ul class="toc">
<li class="level1"><div class="li"><a href="#installation">Installation</a></div>
<ul class="toc">
<li class="level2"><div class="li"><a href="#activation">Activation</a></div></li>
<li class="level2"><div class="li"><a href="#storage">Storage</a></div>
<ul class="toc">
<li class="level3"><div class="li"><a href="#file">File</a></div></li>
<li class="level3"><div class="li"><a href="#dbi">DBI</a></div></li>
<li class="level3"><div class="li"><a href="#ldap">LDAP</a></div></li>
</ul>
</li>
<li class="level2"><div class="li"><a href="#wildcard">Wildcard</a></div></li>
<li class="level2"><div class="li"><a href="#custom_xslt_file">Custom XSLT file</a></div></li>
</ul>
</li>
<li class="level1"><div class="li"><a href="#using_notification_system">Using notification system</a></div>
<ul class="toc">
<li class="level2"><div class="li"><a href="#notification_format">Notification format</a></div></li>
<li class="level2"><div class="li"><a href="#create_new_notifications_with_notifications_explorer">Create new notifications with notifications explorer</a></div></li>
<li class="level2"><div class="li"><a href="#notifications_trough_soap">Notifications trough SOAP</a></div>
<ul class="toc">
<li class="level3"><div class="li"><a href="#insertion_example_in_perl">Insertion example in Perl</a></div></li>
<li class="level3"><div class="li"><a href="#deletion_example_in_perl">Deletion example in Perl</a></div></li>
</ul>
</li>
<li class="level2"><div class="li"><a href="#test_notification">Test notification</a></div></li>
</ul></li>
</ul>
</div>
</div>
<!-- TOC END -->
<h1 class="sectionedit1" id="notifications_system">Notifications system</h1>
<div class="level1">
<p>
Since version 0.9.4, LemonLDAP::NG can be used to notify some messages to users: if a user has a message, the message will be displayed when he will access to the portal. If the message contains check boxes, the user has to check all of them else he can not access to the portal and get his session cookie.
</p>
<p>
Since 1.1.0, a notification explorer is available in Manager, and notifications can be done for all users, with the possibility to display conditions. When the user accept the notification, the reference is stored in his persistent session.
</p>
</div>
<!-- EDIT1 SECTION "Notifications system" [1-586] -->
<h2 class="sectionedit2" id="installation">Installation</h2>
<div class="level2">
</div>
<!-- EDIT2 SECTION "Installation" [587-612] -->
<h3 class="sectionedit3" id="activation">Activation</h3>
<div class="level3">
<p>
You just have to activate Notifications in the Manager (General Parameters &gt; Advanced Parameters &gt; Notifications &gt; Activation) or in lemonldap-ng.ini:
</p>
<pre class="code file ini"><span class="re0"><span class="br0">&#91;</span>portal<span class="br0">&#93;</span></span>
<span class="re1">notification</span> <span class="sy0">=</span><span class="re2"> 1</span></pre>
</div>
<!-- EDIT3 SECTION "Activation" [613-831] -->
<h3 class="sectionedit4" id="storage">Storage</h3>
<div class="level3">
<p>
By default, notifications will be stored in the same database as configuration:
</p>
<ul>
<li class="level1"><div class="li"> if you use “File” system and your “dirName” is set to /usr/local/lemonldap-ng/conf/, the notifications will be stored in /usr/local/lemonldap-ng/notifications/</div>
</li>
<li class="level1"><div class="li"> if you use “CDBI” or “RDBI” system, the notifications will be stored in the same database as configuration and in a table called “notifications”.</div>
</li>
<li class="level1"><div class="li"> if you use “LDAP” system, the notifications will be stored in the same directory as configuration and in a branch called “notifications”.</div>
</li>
</ul>
<p>
You can change default parameters using the “notificationStorage” and “notificationStorageOptions” parameters with the same syntax as configuration storage parameters. To do this in Manager, go in General Parameters &gt; Advanced Parameters &gt; Notifications.
</p>
</div>
<h4 id="file">File</h4>
<div class="level4">
<p>
Parameters for File backend are the same as <a href="fileconfbackend.html" class="wikilink1" title="documentation:2.0:fileconfbackend">File configuration backend</a>.
</p>
<div class="noteimportant">You need to create yourself the directory and set write access to Apache user. For example:
<pre class="code">mkdir /usr/local/lemonldap-ng/notifications/
chown www-data /usr/local/lemonldap-ng/notifications/</pre>
</div><div class="notetip">The file name default separator is <code>_</code>, this can be a problem if you register notifications for users having <code>_</code> in their login. You can change the separator with the <code>fileNameSeparator</code> option, and set another value, for example <code>@</code>.
</div>
<p>
To summary available options:
</p>
<ul>
<li class="level1"><div class="li"> <strong>dirName</strong>: directory where notifications are stored.</div>
</li>
<li class="level1"><div class="li"> <strong>fileNameSeparator</strong>: file name separator.</div>
</li>
</ul>
</div>
<h4 id="dbi">DBI</h4>
<div class="level4">
<p>
Parameters for <abbr title="Database Interface">DBI</abbr> backend are the same as <a href="sqlconfbackend.html" class="wikilink1" title="documentation:2.0:sqlconfbackend">DBI configuration backend</a>.
</p>
<div class="noteimportant">You have to create the table by yourself:
<pre class="code sql"><span class="kw1">CREATE</span> <span class="kw1">TABLE</span> notifications <span class="br0">&#40;</span>
<span class="kw1">DATE</span> datetime <span class="kw1">NOT</span> <span class="kw1">NULL</span><span class="sy0">,</span>
uid <span class="kw1">VARCHAR</span><span class="br0">&#40;</span><span class="nu0">255</span><span class="br0">&#41;</span> <span class="kw1">NOT</span> <span class="kw1">NULL</span><span class="sy0">,</span>
<span class="kw1">REF</span> <span class="kw1">VARCHAR</span><span class="br0">&#40;</span><span class="nu0">255</span><span class="br0">&#41;</span> <span class="kw1">NOT</span> <span class="kw1">NULL</span><span class="sy0">,</span>
cond <span class="kw1">VARCHAR</span><span class="br0">&#40;</span><span class="nu0">255</span><span class="br0">&#41;</span> <span class="kw1">DEFAULT</span> <span class="kw1">NULL</span><span class="sy0">,</span>
xml longblob <span class="kw1">NOT</span> <span class="kw1">NULL</span><span class="sy0">,</span>
done datetime <span class="kw1">DEFAULT</span> <span class="kw1">NULL</span><span class="sy0">,</span>
<span class="kw1">PRIMARY</span> <span class="kw1">KEY</span> <span class="br0">&#40;</span><span class="kw1">DATE</span><span class="sy0">,</span> uid<span class="sy0">,</span><span class="kw1">REF</span><span class="br0">&#41;</span>
<span class="br0">&#41;</span></pre>
</div>
<p>
To summary available options:
</p>
<ul>
<li class="level1"><div class="li"> <strong>dbiChain</strong>: <abbr title="Database Interface">DBI</abbr> connection.</div>
</li>
<li class="level1"><div class="li"> <strong>dbiUser</strong>: <abbr title="Database Interface">DBI</abbr> user.</div>
</li>
<li class="level1"><div class="li"> <strong>dbiPassword</strong>: <abbr title="Database Interface">DBI</abbr> password.</div>
</li>
<li class="level1"><div class="li"> <strong>table</strong>: Notifications table name.</div>
</li>
</ul>
</div>
<h4 id="ldap">LDAP</h4>
<div class="level4">
<p>
Parameters for LDAP backend are the same as <a href="ldapconfbackend.html" class="wikilink1" title="documentation:2.0:ldapconfbackend">LDAP configuration backend</a>.
</p>
<div class="noteimportant">You have to create the branch by yourself
</div>
<p>
To summary available options:
</p>
<ul>
<li class="level1"><div class="li"> <strong>ldapServer</strong>: LDAP <abbr title="Uniform Resource Locator">URL</abbr>.</div>
</li>
<li class="level1"><div class="li"> <strong>ldapBindDN</strong>: LDAP user.</div>
</li>
<li class="level1"><div class="li"> <strong>ldapBindPassword</strong>: LDAP password.</div>
</li>
<li class="level1"><div class="li"> <strong>ldapConfBase</strong>: Notifications branch <abbr title="Distinguished Name">DN</abbr>.</div>
</li>
</ul>
</div>
<!-- EDIT4 SECTION "Storage" [832-3326] -->
<h3 class="sectionedit5" id="wildcard">Wildcard</h3>
<div class="level3">
<p>
The notifications module uses a wildcard to manage notifications for all users. The default value of this wilcard is <code>allusers</code>, but you can change it if <code>allusers</code> is a known identifier in your system.
</p>
<p>
To change it, go in General Parameters &gt; Advanced Parameters &gt; Notifications &gt; Wildcard for all users, and set for example <code>alluserscustom</code>.
</p>
<p>
Then creating a notification for <code>alluserscustom</code> will display the notification for all users.
</p>
</div>
<!-- EDIT5 SECTION "Wildcard" [3327-3796] -->
<h3 class="sectionedit6" id="custom_xslt_file">Custom XSLT file</h3>
<div class="level3">
<p>
The transformation between notification XML content and <abbr title="HyperText Markup Language">HTML</abbr> display is done with XSLT. The default XSLT file is in portal/skins/common/notification.xsl. You can create your own XSLT file and store in another place, for example /etc/lemonldap-ng. Then just configure the new XSLT file path in Manager, go in General Parameters &gt; Advanced Parameters &gt; Notifications &gt; Custom XSLT file and set for example <code>/etc/lemonldap-ng/notification.xsl</code>.
</p>
</div>
<!-- EDIT6 SECTION "Custom XSLT file" [3797-4269] -->
<h2 class="sectionedit7" id="using_notification_system">Using notification system</h2>
<div class="level2">
</div>
<!-- EDIT7 SECTION "Using notification system" [4270-4308] -->
<h3 class="sectionedit8" id="notification_format">Notification format</h3>
<div class="level3">
<p>
Notifications are XML files containing:
</p>
<ul>
<li class="level1"><div class="li"> &lt;notification&gt; element(s) :</div>
<ul>
<li class="level2"><div class="li"> Required attributes:</div>
<ul>
<li class="level3"><div class="li"> date: creation date (format YYYY-MM-DD)</div>
</li>
<li class="level3"><div class="li"> ref: a reference that can be used later to know what has been notified and when</div>
</li>
<li class="level3"><div class="li"> uid: the user login (it must correspond to the attribute set in whatToTrace parameter, uid by default), or the wildcard string (by default: <code>allusers</code>) if the notification should be displayed for every user.</div>
</li>
</ul>
</li>
<li class="level2"><div class="li"> Optional attributes:</div>
<ul>
<li class="level3"><div class="li"> condition: condition to display the notification, can use all session variables.</div>
</li>
</ul>
</li>
<li class="level2"><div class="li"> Sub elements:</div>
<ul>
<li class="level3"><div class="li"> &lt;title&gt;: title to display: will be inserted in <abbr title="HyperText Markup Language">HTML</abbr> page enclosed in &lt;h2 class=“notifText”&gt;&lt;/h2&gt;</div>
</li>
<li class="level3"><div class="li"> &lt;subtitle&gt;: subtitle to display: will be inserted in <abbr title="HyperText Markup Language">HTML</abbr> page enclosed in &lt;h2 class=“notifText”&gt;&lt;/h2&gt;</div>
</li>
<li class="level3"><div class="li"> &lt;text&gt;: paragraph to display: will be inserted in <abbr title="HyperText Markup Language">HTML</abbr> page enclosed in &lt;p class=“notifText”&gt;&lt;/p&gt;</div>
</li>
<li class="level3"><div class="li"> &lt;check&gt;: paragraph to display with a checkbox: will be inserted in <abbr title="HyperText Markup Language">HTML</abbr> page enclosed in &lt;p class=“notifCheck”&gt;&lt;input type=“checkbox” /&gt;&lt;/p&gt;</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="noteimportant">All other elements will be removed including <abbr title="HyperText Markup Language">HTML</abbr> elements like &lt;b&gt;.
</div><div class="notetip">One notification XML document can contain several notifications messages.
</div>
<p>
Example :
</p>
<pre class="code file xml"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span> <span class="re0">standalone</span>=<span class="st0">&quot;no&quot;</span><span class="re2">?&gt;</span></span>
<span class="sc3"><span class="re1">&lt;root<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;notification</span> <span class="re0">uid</span>=<span class="st0">&quot;foo.bar&quot;</span> <span class="re0">date</span>=<span class="st0">&quot;2009-01-27&quot;</span> <span class="re0">reference</span>=<span class="st0">&quot;ABC&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;title<span class="re2">&gt;</span></span></span>You have new authorizations<span class="sc3"><span class="re1">&lt;/title<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;subtitle<span class="re2">&gt;</span></span></span>Application 1<span class="sc3"><span class="re1">&lt;/subtitle<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;text<span class="re2">&gt;</span></span></span>You have been granted to access to appli-1<span class="sc3"><span class="re1">&lt;/text<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;subtitle<span class="re2">&gt;</span></span></span>Application 2<span class="sc3"><span class="re1">&lt;/subtitle<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;text<span class="re2">&gt;</span></span></span>You have been granted to access to appli-2<span class="sc3"><span class="re1">&lt;/text<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;subtitle<span class="re2">&gt;</span></span></span>Acceptation<span class="sc3"><span class="re1">&lt;/subtitle<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;check<span class="re2">&gt;</span></span></span>I know that I can access to appli-1 <span class="sc3"><span class="re1">&lt;/check<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;check<span class="re2">&gt;</span></span></span>I know that I can access to appli-2 <span class="sc3"><span class="re1">&lt;/check<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/notification<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;notification</span> <span class="re0">uid</span>=<span class="st0">&quot;allusers&quot;</span> <span class="re0">date</span>=<span class="st0">&quot;2009-01-27&quot;</span> <span class="re0">reference</span>=<span class="st0">&quot;disclaimer&quot;</span> <span class="re0">condition</span>=<span class="st0">&quot;$ipAddr =~ /^192/&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;title<span class="re2">&gt;</span></span></span>This is your first access on this system<span class="sc3"><span class="re1">&lt;/title<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;text<span class="re2">&gt;</span></span></span>Be a nice user and do not break it please.<span class="sc3"><span class="re1">&lt;/text<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;check<span class="re2">&gt;</span></span></span>Of course I am not evil!<span class="sc3"><span class="re1">&lt;/check<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/notification<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/root<span class="re2">&gt;</span></span></span></pre>
</div>
<!-- EDIT8 SECTION "Notification format" [4309-6407] -->
<h3 class="sectionedit9" id="create_new_notifications_with_notifications_explorer">Create new notifications with notifications explorer</h3>
<div class="level3">
<p>
In Manager, click on <code>Notifications</code> and then on the <code>Create</code> button.
</p>
<p>
<img src="documentation/manager-notification.png" class="mediacenter" alt="" />
</p>
<p>
Then fill all inputs to create the notification. Only the condition is not mandatory.
</p>
<p>
When all is ok, click on <code>Save</code>.
</p>
</div>
<!-- EDIT9 SECTION "Create new notifications with notifications explorer" [6408-6726] -->
<h3 class="sectionedit10" id="notifications_trough_soap">Notifications trough SOAP</h3>
<div class="level3">
<p>
New notifications can be insert using SOAP request (described in the WSDL file generated by buildPortalWSDL tool). To activate SOAP on the portal:
</p>
<ul>
<li class="level1"><div class="li"> Enable SOAP in General parameters » Advanced parameters » SOAP</div>
</li>
<li class="level1"><div class="li"> Enable Notifications SOAP service in Apache configuration:</div>
</li>
</ul>
<pre class="code file apache"><span class="co1"># SOAP functions for notification insertion (disabled by default)</span>
&lt;<span class="kw3">Location</span> /index.pl/notification&gt;
<span class="kw1">Order</span> <span class="kw1">deny</span>,<span class="kw1">allow</span>
<span class="kw1">Deny</span> from <span class="kw2">all</span>
<span class="kw1">Allow</span> from 192.168.2.0/<span class="nu0">24</span>
&lt;/<span class="kw3">Location</span>&gt;</pre>
</div>
<h4 id="insertion_example_in_perl">Insertion example in Perl</h4>
<div class="level4">
<pre class="code perl"><span class="co1">#!/usr/bin/perl</span>
&nbsp;
<span class="kw2">use</span> SOAP<span class="sy0">::</span><span class="me2">Lite</span><span class="sy0">;</span>
<span class="kw2">use</span> utf8<span class="sy0">;</span>
&nbsp;
<span class="kw1">my</span> <span class="re0">$lite</span> <span class="sy0">=</span> SOAP<span class="sy0">::</span><span class="me2">Lite</span>
<span class="sy0">-&gt;</span><span class="me1">uri</span><span class="br0">&#40;</span><span class="st_h">'urn:Lemonldap::NG::Common::CGI::SOAPService'</span><span class="br0">&#41;</span>
<span class="sy0">-&gt;</span><span class="me1">proxy</span><span class="br0">&#40;</span><span class="st_h">'http://auth.example.com/index.pl/notification'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
&nbsp;
<span class="re0">$r</span> <span class="sy0">=</span> <span class="re0">$lite</span><span class="sy0">-&gt;</span><span class="me1">newNotification</span><span class="br0">&#40;</span>
<span class="st_h">'&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;
&lt;root&gt;
&lt;notification uid=&quot;foo.bar&quot; date=&quot;2009-01-27&quot; reference=&quot;ABC&quot;&gt;
&lt;text&gt; You have been granted to access to appli-1 &lt;/text&gt;
&lt;text&gt; You have been granted to access to appli-2 &lt;/text&gt;
&lt;check&gt; I know that I can acces to appli-1 &lt;/check&gt;
&lt;check&gt; I know that I can acces to appli-2 &lt;/check&gt;
&lt;/notification&gt;
&lt;/root&gt;
'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$r</span><span class="sy0">-&gt;</span><span class="me1">fault</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span>
<a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="kw2">STDERR</span> <span class="st0">&quot;SOAP Error: &quot;</span> <span class="sy0">.</span> <span class="re0">$r</span><span class="sy0">-&gt;</span><span class="me1">fault</span><span class="sy0">-&gt;</span><span class="br0">&#123;</span>faultstring<span class="br0">&#125;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
<span class="kw1">else</span> <span class="br0">&#123;</span>
<span class="kw1">my</span> <span class="re0">$res</span> <span class="sy0">=</span> <span class="re0">$r</span><span class="sy0">-&gt;</span><span class="me1">result</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="st0">&quot;$res notification(s) have been inserted<span class="es0">\n</span>&quot;</span><span class="sy0">;</span>
<span class="br0">&#125;</span></pre>
<p>
You can also delete some notifications with SOAP, once SOAP is activated:
</p>
</div>
<h4 id="deletion_example_in_perl">Deletion example in Perl</h4>
<div class="level4">
<pre class="code perl"><span class="co1">#!/usr/bin/perl</span>
&nbsp;
<span class="kw2">use</span> SOAP<span class="sy0">::</span><span class="me2">Lite</span><span class="sy0">;</span>
<span class="kw2">use</span> utf8<span class="sy0">;</span>
&nbsp;
<span class="kw1">my</span> <span class="re0">$lite</span> <span class="sy0">=</span> SOAP<span class="sy0">::</span><span class="me2">Lite</span>
<span class="sy0">-&gt;</span><span class="me1">uri</span><span class="br0">&#40;</span><span class="st_h">'urn:Lemonldap::NG::Common::CGI::SOAPService'</span><span class="br0">&#41;</span>
<span class="sy0">-&gt;</span><span class="me1">proxy</span><span class="br0">&#40;</span><span class="st_h">'http://auth.example.com/index.pl/notification'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
&nbsp;
<span class="re0">$r</span> <span class="sy0">=</span> <span class="re0">$lite</span><span class="sy0">-&gt;</span><span class="me1">deleteNotification</span><span class="br0">&#40;</span><span class="st_h">'foo.bar'</span><span class="sy0">,</span> <span class="st_h">'ABC'</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$r</span><span class="sy0">-&gt;</span><span class="me1">fault</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span>
<a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="kw2">STDERR</span> <span class="st0">&quot;SOAP Error: &quot;</span> <span class="sy0">.</span> <span class="re0">$r</span><span class="sy0">-&gt;</span><span class="me1">fault</span><span class="sy0">-&gt;</span><span class="br0">&#123;</span>faultstring<span class="br0">&#125;</span><span class="sy0">;</span>
<span class="br0">&#125;</span>
<span class="kw1">else</span> <span class="br0">&#123;</span>
<span class="kw1">my</span> <span class="re0">$res</span> <span class="sy0">=</span> <span class="re0">$r</span><span class="sy0">-&gt;</span><span class="me1">result</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<a href="http://perldoc.perl.org/functions/print.html"><span class="kw3">print</span></a> <span class="st0">&quot;$res notification(s) have been deleted<span class="es0">\n</span>&quot;</span><span class="sy0">;</span>
<span class="br0">&#125;</span></pre>
</div>
<!-- EDIT10 SECTION "Notifications trough SOAP" [6727-8623] -->
<h3 class="sectionedit11" id="test_notification">Test notification</h3>
<div class="level3">
<p>
You&#039;ve simply to insert a notification and connect to the portal using the same UID. You will be prompted.
</p>
<p>
<img src="documentation/portal-notification.png" class="mediacenter" alt="" />
</p>
<p>
Try also to create a global notification (to the uid “allusers”), and connect with any user, the message will be prompted.
</p>
</div>
<!-- EDIT11 SECTION "Test notification" [8624-] --></div>
</body>
</html>