diff --git a/README.md b/README.md
index aec5300e2..fa3c839c9 100644
--- a/README.md
+++ b/README.md
@@ -6,8 +6,8 @@
-[](https://travis-ci.org/YunoHost/yunohost)
-[](https://github.com/YunoHost/yunohost/blob/stretch-unstable/LICENSE)
+[](https://gitlab.com/yunohost/yunohost/-/pipelines)
+[](https://github.com/YunoHost/yunohost/blob/dev/LICENSE)
[](https://mastodon.social/@yunohost)
diff --git a/data/helpers.d/permission b/data/helpers.d/permission
index a5c09cded..c04b4145b 100644
--- a/data/helpers.d/permission
+++ b/data/helpers.d/permission
@@ -362,8 +362,17 @@ ynh_permission_has_user() {
return 1
fi
- yunohost user permission info "$app.$permission" --output-as json --quiet \
- | jq -e --arg user $user '.corresponding_users | index($user)' >/dev/null
+ # Check both allowed and corresponding_users sections in the json
+ for section in "allowed" "corresponding_users"
+ do
+ if yunohost user permission info "$app.$permission" --output-as json --quiet \
+ | jq -e --arg user $user --arg section $section '.[$section] | index($user)' >/dev/null
+ then
+ return 0
+ fi
+ done
+
+ return 1
}
# Check if a legacy permissions exist