Thread: Disable script execution in server level when updating via grids

Disable script execution in server level when updating via grids

From
arun chirappurath
Date:
Hello All,

Is there a way we can disable grid based updates from the clients in the server?

suppose if someone accidentally commits an edit in dbeaver,server shall decline that incoming request. However requests from the query tool should run....

I have seen some options from the client side. Do we have some options in server side?

image.png

Thanks,
Arun
Attachment

Re: Disable script execution in server level when updating via grids

From
Filip Sedlak
Date:
I'd use different users or roles for that - one with more restricted 
rights. I'm not sure how to do it in your specific client.

In general, your user can be granted be granted read-only access and a 
more powerful role to which it can switch explicitly.

mydb=> CREATE TABLE x (id INT);
ERROR:  permission denied for schema public
LINE 1: CREATE TABLE x (id INT);
                      ^
mydb=> SET ROLE powerful;
SET
mydb=> CREATE TABLE x (id INT);
CREATE TABLE

In PostgreSQL up to 15, you have to set "NOINHERIT" to your user so you 
don't automatically get all the privileges on login. In 16, you can set 
INHERIT FALSE when granting the role.

--
Filip Sedlák