diff --git a/tests/setup.inc b/tests/setup.inc index 4ad4f187..68614e30 100644 --- a/tests/setup.inc +++ b/tests/setup.inc @@ -6,6 +6,7 @@ setup() { destroy_containers launch_containers create_rules "piler1" + add_data_officer "piler1" } start_telegraf() { @@ -44,3 +45,8 @@ create_rules() { docker exec "$container" /etc/init.d/rc.piler reload 2>/dev/null } + +add_data_officer() { + local container="$1" + echo 'echo "insert into user (uid, username, realname, password, domain, dn, isadmin) values(2, \"dataofficer\", \"Data officer\", \"\$6\$rX285LfP$ZxhlacbzKuCcqkaizzBu8SAiYb6.f8K4Us08nUHwSpWMQkNhw4o2rmfKXoTfaM4rnBHUYVK1N4IfBsqN8CAtS/\", \"local\", \"*\", 4)"| mysql --defaults-file=/etc/piler/.my.cnf piler' | docker exec -i "$container" sh +} diff --git a/webui/view/theme/default/templates/user/edit.tpl b/webui/view/theme/default/templates/user/edit.tpl index aa4d7d0d..5bdb0a17 100644 --- a/webui/view/theme/default/templates/user/edit.tpl +++ b/webui/view/theme/default/templates/user/edit.tpl @@ -139,7 +139,7 @@ - +