From c4e105f786ca37788e983efc7664f32764f73a0e Mon Sep 17 00:00:00 2001 From: Emmanuel Averty Date: Tue, 8 Aug 2023 18:59:10 +0200 Subject: [PATCH] fix: access token scope --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b307ed8..2c8bb18 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -25,7 +25,7 @@ function create_forgejo_api_user() { ynh_app_setting_set --app=$app --key=forgejo_api_pwd --value=$forgejo_api_pwd pushd "$install_dir" ynh_exec_as $app ./forgejo admin user create --username $forgejo_api_user --password $forgejo_api_pwd --email admin@${domain} --admin --must-change-password=false - forgejo_api_token=$(ynh_exec_as $app ./forgejo admin user generate-access-token --username $forgejo_api_user --token-name "admin" --scopes "sudo" --raw | tail -1) + forgejo_api_token=$(ynh_exec_as $app ./forgejo admin user generate-access-token --username $forgejo_api_user --token-name "admin" --scopes "write:admin" --raw | tail -1) ynh_app_setting_set --app=$app --key=forgejo_api_token --value=$forgejo_api_token popd }