read only user is able to "set role" back into super user

57 Views Asked by At

I have two users running on my databse, the "superuser" and then "readonly" user.

If I log into the database as "readonly" I am not able to use "set role" and "set authorization" as expected.

However if I log into the database as "superuser" and then switch to "readonly", I am able to execute these commands and then switch back to "supeuser"

Is this kind of behavior intended? If so, can it be restricted?

Best regards.

1

There are 1 best solutions below

0
Laurenz Albe On

Yes, that behavior is intended, and you cannot restrict it.