mirror of
https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
synced 2024-09-03 18:36:09 +02:00
Do not add authentication headers from the SSO to the admin page
It conflicts with Etherpad's own login system
This commit is contained in:
parent
5a16e4cd74
commit
c1989a97e5
2 changed files with 6 additions and 2 deletions
|
@ -300,11 +300,11 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-access.log" --failrege
|
||||||
ynh_script_progression --message="Configuring permissions..." --weight=2
|
ynh_script_progression --message="Configuring permissions..." --weight=2
|
||||||
|
|
||||||
if [ $is_public -eq 1 ]; then
|
if [ $is_public -eq 1 ]; then
|
||||||
ynh_permission_update --permission="main" --add="visitors"
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Only the admin can access the admin panel of the app (if the app has an admin panel)
|
# Only the admin can access the admin panel of the app (if the app has an admin panel)
|
||||||
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin --auth_header=false
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
|
@ -135,6 +135,10 @@ fi
|
||||||
if ! ynh_permission_exists --permission="admin"; then
|
if ! ynh_permission_exists --permission="admin"; then
|
||||||
# Create the required permissions
|
# Create the required permissions
|
||||||
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||||
|
else
|
||||||
|
# Make sure the admin panel is not exposed to the SSO's authentication headers
|
||||||
|
# AFAIK there is no helper to check if that flag is up or not, so let's force it.
|
||||||
|
ynh_permission_url --permission="admin" --auth_header=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue