mirror of
https://github.com/YunoHost-Apps/forgejo_ynh.git
synced 2024-09-03 18:36:26 +02:00
During synchronize_users, fetch token independently such that it's redacted by yunohost logging mechanism
This commit is contained in:
parent
8e5b248b2c
commit
467796d445
1 changed files with 4 additions and 2 deletions
|
@ -41,6 +41,8 @@ function set_users_login_source() {
|
||||||
|
|
||||||
function synchronize_users() {
|
function synchronize_users() {
|
||||||
ynh_print_info --message="Synchronizing forgejo users"
|
ynh_print_info --message="Synchronizing forgejo users"
|
||||||
|
# Fetch the token independently such that it's redacted by Yunohost logging mechanism
|
||||||
|
forgejo_api_token=$(ynh_app_setting_get --app=$app --key=forgejo_api_token)
|
||||||
# User synchronization must be launched using API : no cli exists for this purpose (https://codeberg.org/forgejo/forgejo/issues/953)
|
# User synchronization must be launched using API : no cli exists for this purpose (https://codeberg.org/forgejo/forgejo/issues/953)
|
||||||
curl --url https://${domain}${path}/api/v1/admin/cron/sync_external_users -X POST -H "Authorization: token $(ynh_app_setting_get --app=$app --key=forgejo_api_token)" -kfsS
|
curl --url https://${domain}${path}/api/v1/admin/cron/sync_external_users -X POST -H "Authorization: token $forgejo_api_token" -kfsS
|
||||||
}
|
}
|
Loading…
Reference in a new issue