Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
Update readonly-user.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
wojcik-dorota authored Dec 27, 2023
1 parent 77fada8 commit 4be7747
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/products/postgresql/howto/readonly-user.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Restrict access to databases or tables in Aiven for PostgreSQL®
===============================================================
This article shows how you can restrict access to Aiven for PostgreSQL® databases and tables by setting up read-only permissions for specific user's roles.

You can restrict access to Aiven for PostgreSQL® databases and tables by setting up read-only permissions for specific user's roles.

Set read-only access in a schema
--------------------------------

1. Modify default permissions for a user's role in a particular schema.

.. code-block:: bash
Expand All @@ -18,8 +20,9 @@ Set read-only access in a schema
Set read-only access in a database
----------------------------------
You can set up the read-only access for a specific user's role in a particular database.
1. Create a new database which will be used as a template ``create database ro_<name>_template...``
1. Create a new database which will be used as a template ``create database ro_<name>_template...``.
2. For the new template database, set permissions and roles that you want as default ones in the template.
3. When creating a new database, use ``create database NAME with template = 'ro_<name>_template'``
3. When creating a new database, use ``create database NAME with template = 'ro_<name>_template'``.

0 comments on commit 4be7747

Please sign in to comment.