mirror of
https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
synced 2024-09-03 18:36:09 +02:00
ldap support for mypads
This commit is contained in:
parent
67fa229946
commit
51ddcd64d6
4 changed files with 50 additions and 5 deletions
|
@ -1,5 +1,4 @@
|
|||
;; Test complet avec libreoffice sans mypads
|
||||
auto_remove=1
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
|
@ -9,6 +8,7 @@
|
|||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
export="libreoffice"
|
||||
mypads=0
|
||||
useldap=0
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
|
@ -23,7 +23,6 @@
|
|||
port_already_use=1 (9001)
|
||||
change_url=1
|
||||
;; Test avec mypads
|
||||
auto_remove=1
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
|
@ -33,13 +32,13 @@
|
|||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
export="libreoffice"
|
||||
mypads=1
|
||||
useldap=1
|
||||
; Checks
|
||||
setup_root=1
|
||||
upgrade=1
|
||||
upgrade=1 from_commit=8bf300413ec3adcb416d168d2e9e98975dd9405b
|
||||
backup_restore=1
|
||||
;; Test abiword
|
||||
auto_remove=1
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
|
@ -49,10 +48,10 @@
|
|||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
export="abiword"
|
||||
mypads=1
|
||||
useldap=0
|
||||
; Checks
|
||||
setup_root=1
|
||||
;; Test sans export
|
||||
auto_remove=1
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
|
@ -62,6 +61,7 @@
|
|||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
export="none"
|
||||
mypads=1
|
||||
useldap=0
|
||||
; Checks
|
||||
setup_root=1
|
||||
;;; Levels
|
||||
|
|
|
@ -87,6 +87,30 @@
|
|||
"ep_comments_page": {
|
||||
"highlightSelectedText": false
|
||||
},
|
||||
// ep_mypads
|
||||
//noldap "ep_mypads": {
|
||||
//noldap "ldap": {
|
||||
//noldap // Your LDAP URL
|
||||
//noldap "url": "ldap://127.0.0.1",
|
||||
//noldap // Where to search your users
|
||||
//noldap "searchBase": "ou=users,dc=yunohost,dc=org",
|
||||
//noldap // A LDAP filter ({{username}} is replaced by user's login)
|
||||
//noldap "searchFilter": "(&(|(objectclass=posixAccount))(uid={{username}}))",
|
||||
//noldap // LDAP properties mapping for MyPads
|
||||
//noldap "properties": {
|
||||
//noldap // Which LDAP property will be used as user's login?
|
||||
//noldap "login": "uid",
|
||||
//noldap // as user's email
|
||||
//noldap "email": "mail",
|
||||
//noldap // as user's firstname
|
||||
//noldap "firstname": "givenName",
|
||||
//noldap // as users's lastname
|
||||
//noldap "lastname": "sn"
|
||||
//noldap },
|
||||
//noldap // Default langage for LDAP created users
|
||||
//noldap "defaultLang": "__LANGUAGE__"
|
||||
//noldap }
|
||||
//noldap },
|
||||
|
||||
/* Should we suppress errors from being visible in the default Pad Text? */
|
||||
"suppressErrorsInPadText" : false,
|
||||
|
|
|
@ -102,6 +102,19 @@
|
|||
"en": "<a href=https://git.framasoft.org/framasoft/ep_mypads target=_blank>mypads plugin</a>"
|
||||
},
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "useldap",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Do you want to use ldap with mypads ?",
|
||||
"fr": "Voulez-vous utiliser ldap avec mypads ?"
|
||||
},
|
||||
"help": {
|
||||
"en": "Using ldap won't let you add new user aside from YunoHost users.",
|
||||
"fr": "Utiliser ldap ne vous permettra pas d'ajouter un nouvel utilisateur en dehors des utilisateurs de YunoHost."
|
||||
},
|
||||
"default": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ source _common.sh
|
|||
source /usr/share/yunohost/helpers
|
||||
# Load common variables for all scripts.
|
||||
source _variables
|
||||
source _sed
|
||||
|
||||
#=================================================
|
||||
# MANAGE FAILURE OF THE SCRIPT
|
||||
|
@ -34,6 +33,7 @@ language=$YNH_APP_ARG_LANGUAGE
|
|||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
export=$YNH_APP_ARG_EXPORT
|
||||
mypads=$YNH_APP_ARG_MYPADS
|
||||
useldap=$YNH_APP_ARG_USELDAP
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -76,6 +76,7 @@ ynh_print_OFF; ynh_app_setting_set $app password $password; ynh_print_ON
|
|||
ynh_app_setting_set $app language $language
|
||||
ynh_app_setting_set $app export $export
|
||||
ynh_app_setting_set $app mypads $mypads
|
||||
ynh_app_setting_set $app useldap $useldap
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
|
@ -180,6 +181,13 @@ then
|
|||
ynh_replace_string "\"soffice\" : null" "\"soffice\" : \"$soffice_path\"" "$final_path/settings.json" # Renseigne l'emplacement de abiword dans la config de etherpad
|
||||
fi
|
||||
ynh_replace_string "__LANGUAGE__" "$language" "$final_path/settings.json"
|
||||
|
||||
# Use ldap for mypads
|
||||
if [ $mypads -eq 1 ] && [ $useldap -eq 1 ]
|
||||
then
|
||||
ynh_replace_string "//noldap" "" "$final_path/settings.json"
|
||||
fi
|
||||
|
||||
ynh_store_file_checksum "$final_path/settings.json" # Enregistre la somme de contrôle du fichier de config
|
||||
ynh_store_file_checksum "$final_path/credentials.json" # Enregistre la somme de contrôle du fichier de config
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue