mirror of
https://github.com/YunoHost-Apps/vaultwarden_ynh.git
synced 2024-09-03 18:26:31 +02:00
Merge pull request #233 from YunoHost-Apps/fix-api
Fix API permission for clients
This commit is contained in:
commit
57aabdfb8b
2 changed files with 4 additions and 2 deletions
|
@ -211,7 +211,7 @@ then
|
||||||
ynh_permission_update --permission="main" --add="visitors"
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_permission_create --permission="api" --url="/api" --additional_urls="/identity/connect/token" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true"
|
ynh_permission_create --permission="api" --url="/api" --additional_urls="/identity" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true"
|
||||||
ynh_permission_create --permission="admin" --url="/admin" --allowed="$admin" --show_tile="false"
|
ynh_permission_create --permission="admin" --url="/admin" --allowed="$admin" --show_tile="false"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -109,7 +109,9 @@ fi
|
||||||
|
|
||||||
# Create a permission if needed
|
# Create a permission if needed
|
||||||
if ! ynh_permission_exists --permission="api"; then
|
if ! ynh_permission_exists --permission="api"; then
|
||||||
ynh_permission_create --permission="api" --url="/api" --additional_urls="/identity/connect/token" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true"
|
ynh_permission_create --permission="api" --url="/api" --additional_urls="/identity" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true"
|
||||||
|
else
|
||||||
|
ynh_permission_url --permission="api" --remove_url="/identity/connect/token" --add_url="/identity"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If datadir doesn't exist, create it
|
# If datadir doesn't exist, create it
|
||||||
|
|
Loading…
Reference in a new issue