Ver código fonte

corrected hardcoded matrix domain and added code to remove old matrix-make-user-admin script per suggestion.

pull/351/head
prasket 6 anos atrás
pai
commit
83e7a8d9e6
2 arquivos alterados com 7 adições e 1 exclusões
  1. +6
    -0
      roles/matrix-postgres/tasks/setup_postgres.yml
  2. +1
    -1
      roles/matrix-postgres/templates/usr-local-bin/matrix-change-user-admin-status.j2

+ 6
- 0
roles/matrix-postgres/tasks/setup_postgres.yml Ver arquivo

@@ -80,6 +80,12 @@
mode: 0750 mode: 0750
when: matrix_postgres_enabled|bool when: matrix_postgres_enabled|bool


- name: (Migration) Ensure old matrix-make-user-admin script deleted
file:
path: "/usr/local/bin/matrix-make-user-admin"
state: absent
when: matrix_postgres_enabled|bool

- name: Ensure matrix-postgres-update-user-password-hash script created - name: Ensure matrix-postgres-update-user-password-hash script created
template: template:
src: "{{ role_path }}/templates/usr-local-bin/matrix-postgres-update-user-password-hash.j2" src: "{{ role_path }}/templates/usr-local-bin/matrix-postgres-update-user-password-hash.j2"


+ 1
- 1
roles/matrix-postgres/templates/usr-local-bin/matrix-change-user-admin-status.j2 Ver arquivo

@@ -16,4 +16,4 @@ docker run \
--env-file=/matrix/postgres/env-postgres-psql \ --env-file=/matrix/postgres/env-postgres-psql \
--network matrix \ --network matrix \
postgres:12.1-alpine \ postgres:12.1-alpine \
psql -h matrix-postgres -c "UPDATE users set admin=$2 WHERE name like '@$1:seattlematrix.org'"
psql -h matrix-postgres -c "UPDATE users set admin=$2 WHERE name like '@$1:{{ matrix_domain }}'"

Carregando…
Cancelar
Salvar