mirror of
https://github.com/YunoHost-Apps/dolibarr_ynh.git
synced 2024-09-03 18:35:53 +02:00
5cc9b9c96f
YunoHost users are now instantly logged in with HTTP auth For this feature to work, the app now needs to be private, all YNH users must be added in the database, and the admin user must be a YNH user. As a result, the manifest has changed: - Admin password is replaced by admin user - Public/Private is removed - Adding YNH users as Dolibarr users is removed: this is default now Unfortunately, upgrading the app will not change the previous behavior (ie no automatic login). For automatic login to work, you **must** reinstall the app The sync script does not delete users. Therefore the post_user_delete hook is not needed (and does not work anyway)
14 lines
415 B
Bash
14 lines
415 B
Bash
#!/bin/bash
|
|
app=YNH_APP
|
|
src_path=/var/www/$app
|
|
user=YNH_USER
|
|
member=YNH_MEMBER
|
|
|
|
# Sync users
|
|
sudo sudo -u www-data php $src_path/scripts/user/sync_users_ldap2dolibarr.php commitiferror --server=localhost -y
|
|
|
|
# If YNH users should also be members, sync members
|
|
if [ $member = 1 ];
|
|
then
|
|
sudo sudo -u www-data php $src_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y
|
|
fi
|