Mercurial > gemma
comparison schema/install-db.sh @ 319:ac760b0f22a9
Add special role for password reset
As password reset is exposed without requiring a login, let this role
have privileges limited to reseting passwords, and only reseting passwords.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 02 Aug 2018 13:06:39 +0200 |
parents | dfb989088158 |
children | fd04bccae6ca |
comparison
equal
deleted
inserted
replaced
318:1a2dfd9351e9 | 319:ac760b0f22a9 |
---|---|
96 echo "Really drop database '$db' and alle gemma roles? [type 'yes']: " | 96 echo "Really drop database '$db' and alle gemma roles? [type 'yes']: " |
97 read a | 97 read a |
98 if [[ $a == "yes" ]] ; then | 98 if [[ $a == "yes" ]] ; then |
99 dropdb -p "$port" "$db" | 99 dropdb -p "$port" "$db" |
100 for r in `psql -p $port -t -c '\du' | awk -F '|' \ | 100 for r in `psql -p $port -t -c '\du' | awk -F '|' \ |
101 '$1 "." $3 ~ /waterway_user|waterway_admin|sys_admin/ \ | 101 '$1 "." $3 ~ /waterway_user|waterway_admin|sys_admin|pw_reset/ \ |
102 {print $1}'` | 102 {print $1}'` |
103 do | 103 do |
104 dropuser -p "$port" "$r" | 104 dropuser -p "$port" "$r" |
105 done | 105 done |
106 else | 106 else |