diff --git a/app_radicale.md b/app_radicale.md
index 83363c1..aba8d8c 100644
--- a/app_radicale.md
+++ b/app_radicale.md
@@ -1,19 +1,103 @@
-#Radicale
+# Radicale
-
-Radicale is now replaced by Baikal
-
+Radical is a calendar and contact server CalDAV/CardDAV. It does not have an administration interface.
-## CalDAV Sync
-URL: https://example.org/patch/login/calendar.ics/
+Radical is installed by default with the web client InfCloud that will view and edit your calendars and address books.
-Exemple: https://plop.example.org/sync/beudbeud/calendar.ics/
+To connect another client to radical, we must inform these addresses:
-## CardDAV Sync
-URL: https://example.org/patch/login/AddressBook.vcf/
+## Complete CalDAV/CardDAV collection of a user:
+URL : https://domain.tld/path/user/
-Exemple: https://plop.example.org/sync/beudbeud/AddressBook.vcf/
+Exemple : https://example.org/radicale/me/
-##Davdroid
-https://github.com/abeudin/radicale_ynh/pull/4
+## To connect a calendar in particular:
+URL : https://domain.tld/path/user/calendar.ics/
+Exemple : https://example.org/radicale/me/calendar.ics/
+
+## To connect an address book in particular:
+URL : https://domain.tld/path/user/AddressBook.vcf/
+
+Exemple : https://example.org/radicale/me/AddressBook.vcf/
+
+## Create a new schedule or a new address book:
+Create a new schedule or a new address book is very simple with radical, just go there! Radical create all new calendar or notebook to nonexistent addresses if you try to access it.
+
+So just log on (as before) to a calendar or a nonexistent address book to create it.
+This can be done simply with a browser, to appear in a collection already connected to a client.
+
+## Go to a calendar or an address book of another user:
+Previous addresses also work to access resources not owned by the authenticated user.
+
+> Example:
+> User1 can connect to the collection of user2
+> https://example.org/radicale/user2/
+> Simply to indicate the login and password of user1.
+> It's sharing rules (see below) that will allow or not to user1 to see the contents of the collection of user2.
+> By default, no sharing is allowed.
+
+---
+
+## Configure the access rights and sharing of calendars and address books:
+By default, any user has the right to read and write on its own calendars and address books.
+It is possible to refine these default rules and to allow sharing by allowing users to access their resources do not own.
+The rules governing these rights should be included in the */etc/radicale/rights*
+
+Each rule is in this form:
+```
+# Comment before rule and explaining that (optional of course):
+[Rule Name]
+user: user concerned
+collection: calendar, book or collection concerned.
+permission: permission, r (read), w (write) or rw (read/write)
+```
+*Rights* file contains several examples that can be exploited.
+To validate changes to the */etc/radicale/rights* file, radical must be recharged via uwsgi service.
+```
+sudo service uwsgi restart
+```
+
+## Share resources:
+To share a calendar or address book, just write a rule permitting. Sharing can be done with another user.
+```
+user: ^user1$
+collection: ^user2/shared2.ics$
+permission: rw
+```
+Or publicly for a remote user does not use the same server.
+```
+user: .*
+collection: ^user2/shared2.ics$
+permission: r
+```
+In both cases, the sharing works only using the full address of the calendar or collection. In other words, the shares do not appear in the collection of a user.
+This limitation may be blocking for clients managing a single collection, as InfCloud. In this particular case, a solution overcomes this problem.
+
+### Share resources directly in the collection of a user:
+> This solution is functional, but is an hack ...
+
+To enable sharing to occur directly in the collection of a user, it must exploit the use of files in Radicale.
+By simply creating a symbolic link to the resource sharing.
+```
+ln -sr user2/shared.ics user1/user2_shared.ics
+```
+The shared resource becomes a resource from the collection of user1, while it physically remains in the collection of user2.
+However, without recourse to the rules for each resource in the collection of user1, the general rule applies. user1 gets so read and write access by default on the shared resource because it is part of his collection.
+
+---
+
+## Making Radical log more verbose:
+By default, the Radical log is set to INFO. This method savings the hard drive but does not debug Radicale in case of problems.
+To pass Radicale in DEBUG mode, edit the */etc/radicale/logging* and change INFO to DEBUG in sections *[logger_root]* and *[handler_file]*. Then reload the uwsgi service.
+Now, the log displays all requests that are made to Radicale and analysis of *rights* file.
+However, do not stay on this mode because the log is filled very quickly.
+
+---
+
+## Change config of InfCloud:
+The configuration of InfCloud is in the *infcloud/config.js* file
+To load any changes in the *config.js* file (or other file of InfCloud) must reload the cache with the script provided.
+```
+sudo ./cache_update.sh
+```
diff --git a/app_radicale_fr.md b/app_radicale_fr.md
index 0239045..b4adfb3 100644
--- a/app_radicale_fr.md
+++ b/app_radicale_fr.md
@@ -35,7 +35,7 @@ Les adresses précédentes fonctionnent également pour accéder à des ressourc
> https://example.org/radicale/user2/
> Il lui suffira d'indiquer le login et mot de passe de user1.
> Ce sont les règles de partage (voir ci-dessous) qui permettront ou pas à user1 de voir le contenu de la collection de user2.
-> Par défaut, aucun partage n'est autorisé. (A VÉRIFIER !!!)
+> Par défaut, aucun partage n'est autorisé.
---
@@ -62,7 +62,7 @@ sudo service uwsgi restart
Pour partager un calendrier ou un carnet d'adresses, il suffit d'écrire une règle le permettant. Le partage peut se faire avec un autre utilisateur.
```
user: ^user1$
-collection: ^user2/shared2$
+collection: ^user2/shared2.ics$
permission: rw
```
Ou publiquement pour un utilisateur distant n'utilisant pas le même serveur.
diff --git a/conf/rights b/conf/rights
index 5dc2e90..ecb1f13 100644
--- a/conf/rights
+++ b/conf/rights
@@ -8,23 +8,28 @@
#
# Leading or ending slashes are trimmed from collection's path.
-
-# Allow authenticated user to read all collections
-[allow-everyone-read]
+# User can read the root of all collection. And discovers your collection.
+[user-read-root-collection]
user: .+
-collection: .*
+collection: ^/
permission: r
-# Give write access to owners
-[owner-write]
+# Give read and write access to owners
+[owner-read-write]
user: .+
-collection: ^%(login)s/.+$
+collection: ^%(login)s|^%(login)s/.*
permission: rw
### EXAMPLES:
+## Allow authenticated user to read all collections
+# [allow-everyone-read]
+# user: .+
+# collection: .*
+# permission: r
+
## This means all users starting with "admin" may read any collection
# [admin]
# user: ^admin.*$
@@ -47,16 +52,16 @@ permission: rw
## Partage public en lecture seule d'un agenda
# [public for readonly]
# user: .*
-# collection: ^utilisateur/nom_calendrier*
+# collection: ^utilisateur/nom_calendrier.ics$
# permission: r
## Partage public en lecture/écriture d'un agenda
# [public for read/write]
# user: .*
-# collection: ^utilisateur/nom_calendrier*
+# collection: ^utilisateur/nom_calendrier.ics$
# permission: rw
# [user1 can read and write user2/shared2]
# user: ^user1$
-# collection: ^user2/shared2$
+# collection: ^user2/shared2.ics$
# permission: rw
diff --git a/hooks/post_user_delete b/hooks/post_user_delete
new file mode 100644
index 0000000..817c1c1
--- /dev/null
+++ b/hooks/post_user_delete
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+user=$1
+final_path=__FINALPATH__
+
+sudo rm -r $final_path/collections/$user
diff --git a/scripts/install b/scripts/install
index 600c44e..2b66f6b 100755
--- a/scripts/install
+++ b/scripts/install
@@ -208,6 +208,8 @@ fi
sudo yunohost app ssowatconf
-# Mise en place du hook pour la création des collections par défaut des nouveaux utilisateurs.
+# Mise en place des hook pour la création des collections par défaut des nouveaux utilisateurs. Et leur suppression
sudo sed -i "s@__FINALPATH__@$final_path@g" ../hooks/post_user_create
sudo yunohost hook add radicale ../hooks/post_user_create
+sudo sed -i "s@__FINALPATH__@$final_path@g" ../hooks/post_user_delete
+sudo yunohost hook add radicale ../hooks/post_user_delete
diff --git a/scripts/upgrade b/scripts/upgrade
index 96ae017..8d52ce4 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -152,6 +152,8 @@ sudo yunohost app ssowatconf
sudo service uwsgi restart
sudo service nginx reload
-# Mise en place du hook pour la création des collections par défaut des nouveaux utilisateurs.
+# Mise en place des hook pour la création des collections par défaut des nouveaux utilisateurs. Et leur suppression
sudo sed -i "s@__FINALPATH__@$final_path@g" ../hooks/post_user_create
sudo yunohost hook add radicale ../hooks/post_user_create
+sudo sed -i "s@__FINALPATH__@$final_path@g" ../hooks/post_user_delete
+sudo yunohost hook add radicale ../hooks/post_user_delete