From c65ae73d1dc9d03cbf4eeb6fd37066cf270250f6 Mon Sep 17 00:00:00 2001 From: Denis CLAVIER Date: Tue, 4 Apr 2023 13:09:14 +0400 Subject: [PATCH] Fix Postgres 15 permission denied issue --- Demo/bootstrap.ldif | 1 + db_init/init_postgres.sh | 1 + oauth/token.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Demo/bootstrap.ldif b/Demo/bootstrap.ldif index 88836aa..14afc7c 100644 --- a/Demo/bootstrap.ldif +++ b/Demo/bootstrap.ldif @@ -11,6 +11,7 @@ uid: jdoe cn: John DOE sn: DOE gn: John +displayName: John DOE mail: john.doe@example.com objectClass: inetOrgPerson # Password : test1234 diff --git a/db_init/init_postgres.sh b/db_init/init_postgres.sh index 44c6c85..fef715c 100755 --- a/db_init/init_postgres.sh +++ b/db_init/init_postgres.sh @@ -37,6 +37,7 @@ info "Creation of role $db_user and database $db_name ..." psql -U postgres -c "CREATE DATABASE $db_name;" psql -U postgres -c "CREATE USER $db_user WITH ENCRYPTED PASSWORD '$db_pass';" psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE $db_name TO $db_user;" +psql -U postgres -c "ALTER DATABASE $db_name OWNER TO $db_user;" #Creating tables for ouath database (use oauth role) info "Creation of tables for database $db_name (using $db_user)" diff --git a/oauth/token.php b/oauth/token.php index fd21603..5ca83cc 100644 --- a/oauth/token.php +++ b/oauth/token.php @@ -1,4 +1,4 @@ -