Kozea / Radicale

A simple CalDAV (calendar) and CardDAV (contact) server.
https://radicale.org
GNU General Public License v3.0
3.36k stars 436 forks source link

Add first login hook #1219

Open itglob opened 2 years ago

itglob commented 2 years ago

Add ability to hook first user login to propagate default address book and calendar, in simple scenario coping two folders from template.

Variant 1:

Add hook= to Auth section
[auth] 
# args send to init-usr.sh $1 – collection-root $2 - username
hook = /full-path/init-usr.sh

Variant 2:

Reorganize hooks, add hooks section and rename old hook to storage_change
[hooks]
storage_change= “as old hook”
# args send to init-usr.sh $1 – collection-root $2 - username
first_login = /full-path/init-usr.sh

I think second variant better because of clearer names. If it’s ok as concept, I can implement it.

pbiering commented 8 months ago

Please provide a PR for that, potentially on top of https://github.com/Kozea/Radicale/pull/1092