File: notifications.html

package info (click to toggle)
lemonldap-ng 1.9.7-3%2Bdeb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 39,024 kB
  • sloc: perl: 37,552; makefile: 922; sh: 472; sql: 5
file content (435 lines) | stat: -rw-r--r-- 26,031 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
  <meta charset="utf-8" />
  <title>documentation:1.9:notifications</title>
<meta name="generator" content="DokuWiki"/>
<meta name="robots" content="index,follow"/>
<meta name="keywords" content="documentation,1.9,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"/>
<!-- //if:usedebianlibs
  <link rel="stylesheet" type="text/css" href="/javascript/bootstrap/css/bootstrap.min.css" />
//elsif:useexternallibs
  <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
//elsif:cssminified
  <link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.min.css" />
//else -->
  <link rel="stylesheet" type="text/css" href="/static/bwr/bootstrap/dist/css/bootstrap.css" />
<!-- //endif -->
<script type="text/javascript">/*<![CDATA[*/var NS='documentation:1.9';var JSINFO = {"id":"documentation:1.9:notifications","namespace":"documentation:1.9"};
/*!]]>*/</script>
<script type="text/javascript" charset="utf-8" src="lib/exe/js.php.t.bootstrap3.js"></script>
<!-- //if:usedebianlibs
<script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
//elsif:useexternallibs
<script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
//elsif:jsminified
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.min.js"></script>
//else -->
<script type="text/javascript" src="/static/bwr/jquery/dist/jquery.js"></script>
<!-- //endif -->
<!-- //if:usedebianlibs
  <script type="text/javascript" src="/javascript/jquery-ui/jquery-ui.min.js"></script>
//elsif:useexternallibs
  <script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
//elsif:jsminified
  <script type="text/javascript" src="/lib/scripts/jquery-ui.min.js"></script>
//else -->
  <script type="text/javascript" src="/lib/scripts/jquery-ui.js"></script>
<!-- //endif -->
</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:1.9: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:1.9: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:1.9: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>