Add support for Matrix Authentication Service
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3108 Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3562
This commit is contained in:
@ -0,0 +1,16 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
#!/bin/bash
|
||||
|
||||
args=$@
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
args="help"
|
||||
fi
|
||||
|
||||
if [ -t 0 ]; then
|
||||
tty_option="-it"
|
||||
else
|
||||
tty_option=""
|
||||
fi
|
||||
|
||||
{{ devture_systemd_docker_base_host_command_docker }} exec $tty_option matrix-authentication-service mas-cli $args
|
@ -0,0 +1,17 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -ne 3 ]; then
|
||||
echo "Usage: "$0" <username> <password> <admin access: 0 or 1>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
user=$1
|
||||
password=$2
|
||||
admin=$3
|
||||
|
||||
if [ "$admin" -eq "1" ]; then
|
||||
{{ devture_systemd_docker_base_host_command_docker }} exec matrix-authentication-service mas-cli manage register-user --yes -p "$password" --admin "$user"
|
||||
else
|
||||
{{ devture_systemd_docker_base_host_command_docker }} exec matrix-authentication-service mas-cli manage register-user --yes -p "$password" --no-admin "$user"
|
||||
fi
|
Reference in New Issue
Block a user