From 0c085af58009d0bf6583043a4bb001d5f79a324e Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" <kop@karlpinc.com> Date: Mon, 9 Oct 2023 01:34:42 +0000 Subject: [PATCH] Must be able to assume the role to create an object owned by the role Unless of course you're a superuser. --- bin/sokwedb-user-add.m4 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/sokwedb-user-add.m4 b/bin/sokwedb-user-add.m4 index 107c3b8..fdf015a 100644 --- a/bin/sokwedb-user-add.m4 +++ b/bin/sokwedb-user-add.m4 @@ -122,18 +122,24 @@ else begin; create user $A_USER password '$A_USER'; alter group $A_GROUP add user $A_USER; +grant $A_USER TO $A_ADMINUSER; create schema $A_USER authorization $A_USER; grant usage on schema $A_USER to public; +revoke $A_USER FROM $A_ADMINUSER; commit; \c sokwedb_test begin; +grant $A_USER TO $A_ADMINUSER; create schema $A_USER authorization $A_USER; grant usage on schema $A_USER to public; +revoke $A_USER FROM $A_ADMINUSER; commit; \c sokwedb_dev begin; +grant $A_USER TO $A_ADMINUSER; create schema $A_USER authorization $A_USER; grant usage on schema $A_USER to public; +revoke $A_USER FROM $A_ADMINUSER; commit; \q EOF -- 2.34.1