1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

fix set_admin_user using @user_name:server_name

user namer in the synapse postgre database is @user_name:server_name and not @user_name:domain
This commit is contained in:
Gredin67 2020-09-13 20:59:30 +02:00 committed by GitHub
parent a05b4909c3
commit 2ea61a0e34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,10 +21,10 @@ description = "Close the ports range 49153:49193 with TCP and UDP. (Undo \"Open
[set_admin_user]
name = "Set a user as admin"
command = "[[ \"$(su --command=\"psql matrix_synapse\" postgres <<< \"UPDATE users SET admin = 1 WHERE name = '@$YNH_ACTION_USERNAME:$(yunohost app setting $YNH_APP_INSTANCE_NAME domain)'\")\" == 'UPDATE 1' ]]"
command = "[[ \"$(su --command=\"psql matrix_synapse\" postgres <<< \"UPDATE users SET admin = 1 WHERE name = '@$YNH_ACTION_USERNAME:$(yunohost app setting $YNH_APP_INSTANCE_NAME server_name)'\")\" == 'UPDATE 1' ]]"
user = "root"
accepted_return_codes = [0]
description = "Set a synapse user as admin in the synapse server. It probably usefull only to manage the community function."
description = "Set a synapse user as admin in the synapse postgreSQL database. It is mainly required to manage the community function."
[set_admin_user.arguments]
[set_admin_user.arguments.username]