Skip to content

Commit

Permalink
fix institution code not setting and reduce db privs
Browse files Browse the repository at this point in the history
  • Loading branch information
biskyt committed Feb 11, 2021
1 parent a8353f6 commit 85b21a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protected/scripts/oe-reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ fi

echo "Clearing current database..."

dbresetsql="drop database if exists openeyes; create database ${DATABASE_NAME:-openeyes}; grant all privileges on ${DATABASE_NAME:-openeyes}.* to '$dbuser'@'%' identified by '$pass'; flush privileges;"
dbresetsql="drop database if exists openeyes; create database ${DATABASE_NAME:-openeyes}; grant SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER on ${DATABASE_NAME:-openeyes}.* to '$dbuser'@'%' identified by '$pass'; flush privileges;"

echo ""
## write-out command to console (helps with debugging)
Expand Down Expand Up @@ -370,7 +370,7 @@ if [ -n "$icode" ]; then
checkicodecmd="SELECT id FROM institution WHERE remote_id = '$icode';"

icodeexists=$(eval "$dbconnectionstring -D ${DATABASE_NAME:-'openeyes'} -e \"$checkicodecmd\"")
if [ -n "$icodeexists" ]; then
if [ -z "$icodeexists" ]; then

echo "
Expand Down

0 comments on commit 85b21a5

Please sign in to comment.