1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/overleaf_ynh.git synced 2024-09-03 19:56:27 +02:00

finish ldap implementation

This commit is contained in:
Thomas 2024-02-10 15:16:14 +01:00 committed by GitHub
parent 53b2f8ccd6
commit 6e79b04ac1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,26 +107,29 @@ ynh_add_config --template="../conf/production.json" --destination="$install_dir/
ynh_add_config --template="../conf/production.json" --destination="$install_dir/live/services/history-v1/config/production.json" ynh_add_config --template="../conf/production.json" --destination="$install_dir/live/services/history-v1/config/production.json"
cp "$install_dir/build/server-ce/config/custom-environment-variables.json" "$install_dir/live/services/history-v1/config/" cp "$install_dir/build/server-ce/config/custom-environment-variables.json" "$install_dir/live/services/history-v1/config/"
sudo patch "$install_dir/live/services/web/app/src/Features/Authentication/AuthenticationController.js" "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex_diff/AuthenticationController.js.diff"
cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/AuthenticationManager.js" "$install_dir/live/services/web/app/src/Features/Authentication/AuthenticationManager.js" sudo patch "$install_dir/live/services/web/app/src/Features/Authentication/AuthenticationManager.js" "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex_diff/AuthenticationManager.js.diff"
cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/ContactController.js" "$install_dir/live/services/web/app/src/Features/Contacts/ContactController.js" sudo patch "$install_dir/live/services/web/app/src/Features/Authentication/ContactController.js" "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex_diff/ContactController.js.diff"
sudo patch "$install_dir/live/services/web/app/src/Features/Authentication/admin-index.pug" "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex_diff/admin-index.pug.diff"
sudo patch "$install_dir/live/services/web/app/src/Features/Authentication/admin-sysadmin.pug" "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex_diff/admin-sysadmin.pug.diff"
sudo patch "$install_dir/live/services/web/app/src/Features/Authentication/login.pug" "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex_diff/login.pug.diff"
sudo patch "$install_dir/live/services/web/app/src/Features/Authentication/navbar-marketing.pug" "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex_diff/navbar-marketing.pug.diff"
sudo patch "$install_dir/live/services/web/app/src/Features/Authentication/navbar.pug" "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex_diff/navbar.pug.diff"
sudo patch "$install_dir/live/services/web/app/src/Features/Authentication/router.js" "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex_diff/router.js.diff"
sudo patch "$install_dir/live/services/web/app/src/Features/Authentication/settings.pug" "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex_diff/settings.pug.diff"
#sed -iE '/type=.*email.*/d' $install_dir/live/services/web/app/views/user/login.pug #sed -iE '/type=.*email.*/d' $install_dir/live/services/web/app/views/user/login.pug
#sed -iE "s/email@example.com/${login_text:-user}/g" $install_dir/live/services/web/app/views/user/login.pug #sed -iE "s/email@example.com/${login_text:-user}/g" $install_dir/live/services/web/app/views/user/login.pug
#sed -iE '/email@example.com/{n;N;N;d}' $install_dir/live/services/web/app/views/user/login.pug #sed -iE '/email@example.com/{n;N;N;d}' $install_dir/live/services/web/app/views/user/login.pug
#sed -iE "s%-synctex=1\",%-synctex=1\", \"-shell-escape\",%g" $install_dir/live/services/clsi/app/js/LatexRunner.js #sed -iE "s%-synctex=1\",%-synctex=1\", \"-shell-escape\",%g" $install_dir/live/services/clsi/app/js/LatexRunner.js
#sed -iE "s%'-synctex=1',%'-synctex=1', '-shell-escape',%g" $install_dir/live/services/clsi/app/js/LatexRunner.js #sed -iE "s%'-synctex=1',%'-synctex=1', '-shell-escape',%g" $install_dir/live/services/clsi/app/js/LatexRunner.js
cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/settings.pug" "$install_dir/live/services/web/app/views/user/settings.pug"
cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/navbar.pug" "$install_dir/live/services/web/app/views/layout/navbar.pug"
cp "$install_dir/build_ldap/ldap-overleaf-sl/sharelatex/admin-sysadmin.pug" "$install_dir/live/services/web/app/views/admin/index.pug"
#touch "$install_dir/live/services/web/app/views/project/editor/review-panel.pug" #touch "$install_dir/live/services/web/app/views/project/editor/review-panel.pug"
ynh_secure_remove --file="$install_dir/build" ynh_secure_remove --file="$install_dir/build"
#ynh_secure_remove --file="$install_dir/build_ldap" ynh_secure_remove --file="$install_dir/build_ldap"
ynh_script_progression --message="Building app..." ynh_script_progression --message="Building app..."
pushd "$install_dir/live" pushd "$install_dir/live"
ynh_use_nodejs ynh_use_nodejs
#ynh_exec_warn_less $ynh_npm install sandboxed-module@latest
ynh_exec_warn_less npm ci ynh_exec_warn_less npm ci
popd popd