mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Merge pull request #141 from YunoHost/check-the-ssowat-conf
Check ssowat conf instead of turbo parsing manifest.json or manifest.toml
This commit is contained in:
commit
d00a1ce9ea
1 changed files with 2 additions and 7 deletions
|
@ -186,17 +186,12 @@ _VALIDATE_THAT_APP_CAN_BE_ACCESSED () {
|
||||||
|
|
||||||
log_small_title "Validating that the app $app_id_to_check can/can't be accessed with its URL..."
|
log_small_title "Validating that the app $app_id_to_check can/can't be accessed with its URL..."
|
||||||
|
|
||||||
# Force the app to public only if we're checking the public-like installs AND there's no is_public arg
|
# Force the app to public only if we're checking the public-like installs AND visitors are allowed to access the app
|
||||||
# For example, that's the case for agendav which is always installed as
|
# For example, that's the case for agendav which is always installed as
|
||||||
# private by default For "regular" apps (with a is_public arg) they are
|
# private by default For "regular" apps (with a is_public arg) they are
|
||||||
# installed as public, and we precisely want to check they are publicly
|
# installed as public, and we precisely want to check they are publicly
|
||||||
# accessible *without* tweaking main permission...
|
# accessible *without* tweaking main permission...
|
||||||
if [[ -e $package_path/manifest.json ]]
|
local has_public_arg=$(LXC_EXEC "cat /etc/ssowat/conf.json" | jq .permissions.\""$app_id_to_check.main"\".public)
|
||||||
then
|
|
||||||
local has_public_arg=$([[ -n "$(jq -r '.arguments.install[] | select(.name=="is_public")' $package_path/manifest.json)" ]] && echo true || echo false)
|
|
||||||
else
|
|
||||||
local has_public_arg=$(grep -q '\[install.init_main_permission\]' $package_path/manifest.toml && echo true || echo false)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$install_type" != 'private' ] && [[ $has_public_arg == "false" ]]
|
if [ "$install_type" != 'private' ] && [[ $has_public_arg == "false" ]]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Add table
Reference in a new issue