I have some data in a postgresqlPostgreSQL database, I use pgAdmin4 for the organisation of the data. I want to create a QGIS project for other users with the data from my database. The users of the project should see the data, load own data to the project, but they should not be able to change my database files.
Therefore I create a user qgis in pgAdmin with this sqlSQL statemant
CreateCREATE ROleROLE "qgis" with
LOGIN
NOSUPERUSER
NOCREATEDB
NOCREATEROLE
NOINHERIT
NOREPLICATION
CONNECTION LIMIT -1
PASSWORD 'xxxx';
AfteAftre the creation of the user I give him the privilegprivilege SELECT for the different tables in my schema with the statement
GRANT SELECT ON TABLE example_1 TO qgis;
But with this privilegprivilege the user cantcan't load the data in QGIS. So I give the user the privilegprivilege USAGE. Then the user can load the data in QGIS, but he can also delete data in the database and add new file. How can I create a user, that can connect to my database, read the data, but nothing more?
Thanks and best regards