mirror of
https://github.com/YunoHost-Apps/dolibarr_ynh.git
synced 2024-09-03 18:35:53 +02:00
Remove member option (useless option) #51
This commit is contained in:
parent
6492f4702c
commit
cabfd3d3c0
4 changed files with 4 additions and 40 deletions
|
@ -3,7 +3,6 @@
|
|||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
admin="john" (USER)
|
||||
member=0
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
|
@ -17,17 +16,6 @@
|
|||
multi_instance=1
|
||||
port_already_use=0
|
||||
change_url=1
|
||||
;; Test member to true
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
admin="john" (USER)
|
||||
member=1
|
||||
; Checks
|
||||
setup_sub_dir=1
|
||||
setup_root=1
|
||||
upgrade=1
|
||||
backup_restore=1
|
||||
;;; Options
|
||||
Email=
|
||||
Notification=none
|
||||
|
|
|
@ -51,16 +51,7 @@
|
|||
"fr": "Choisissez l’administrateur"
|
||||
},
|
||||
"example": "johndoe"
|
||||
},
|
||||
{
|
||||
"name": "member",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Add YunoHost users as members waiting for validation in Dolibarr ? (Useful mainly for associations)",
|
||||
"fr": "Ajouter les utilisateurs YunoHost comme adhérents en attente de validation dans Dolibarr ? (Utile pour les associations)"
|
||||
},
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ ynh_abort_if_errors
|
|||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
member=$YNH_APP_ARG_MEMBER
|
||||
member=0
|
||||
is_public=0
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
@ -48,6 +48,7 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain
|
|||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
||||
ynh_app_setting_set --app=$app --key=member --value=$member
|
||||
ynh_app_setting_set --app=$app --key=version --value=$(ynh_app_upstream_version "../manifest.json")
|
||||
|
||||
#=================================================
|
||||
|
@ -123,11 +124,6 @@ ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --ta
|
|||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$finstall"
|
||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$finstall"
|
||||
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$finstall"
|
||||
if [ $member -eq 1 ]
|
||||
then
|
||||
# If YNH users are members, we must activate the members module
|
||||
ynh_replace_string --match_string="modLdap" --replace_string="modLdap,modAdherent" --target_file="$finstall"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# CONFIGURE THE HOOK FILE FOR USER CREATE
|
||||
|
@ -198,18 +194,6 @@ else
|
|||
ynh_print_warn --message="LDAP user update ended with error"
|
||||
fi
|
||||
|
||||
# If YNH users should be members, populate the database accordingly, create the member list, and sync members
|
||||
if [ $member -eq 1 ]
|
||||
then
|
||||
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ../conf/sql/ldap_member.sql
|
||||
|
||||
if php $final_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y; then
|
||||
ynh_print_info --message="LDAP member update ok"
|
||||
else
|
||||
ynh_print_warn --message="LDAP member update ended with error"
|
||||
fi
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
|
|
|
@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
||||
member=$(ynh_app_setting_get --app=$app --key=member)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
|
|
Loading…
Reference in a new issue