Skip to content

Commit cf4396d

Browse files
Apply suggestions from code review
Co-authored-by: Jessica <[email protected]>
1 parent de0722a commit cf4396d

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

menu/navigation.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3950,7 +3950,7 @@
39503950
"slug": "manage-permissions"
39513951
},
39523952
{
3953-
"label": "Use Row Level Security on a database",
3953+
"label": "Use Row-Level Security on a database",
39543954
"slug": "use-row-level-security"
39553955
},
39563956
{
@@ -3984,7 +3984,7 @@
39843984
"slug": "secure-connection-ssl-tls"
39853985
},
39863986
{
3987-
"label": "Using Row Level Security with PostgREST",
3987+
"label": "Using Row-Level Security with PostgREST",
39883988
"slug": "postgrest-row-level-security"
39893989
}
39903990
],

serverless/sql-databases/api-cli/postgrest-row-level-security.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
meta:
3-
title: How to use Row Level Security with PostgREST for Serverless SQL Databases
4-
description: This page provides the steps to use Row Level Security with PostGREST for Serverless SQL Databases
3+
title: How to use Row-Level Security with PostgREST for Serverless SQL Databases
4+
description: This page provides the steps to use Row-Level Security with PostGREST for Serverless SQL Databases
55
content:
6-
h1: How to use Row Level Security with PostgREST for Serverless SQL Databases
7-
paragraph: This page provides the steps to use Row Level Security with PostGREST for Serverless SQL Databases
6+
h1: How to use Row-Level Security with PostgREST for Serverless SQL Databases
7+
paragraph: This page provides the steps to use Row-Level Security with PostGREST for Serverless SQL Databases
88
tags: sql-databases serverless database row-level-security postgresql postgrest
99
dates:
1010
validation: 2024-09-24
@@ -17,6 +17,8 @@ PostgREST's built-in Row Level Security based on users JWT relies either on [rol
1717

1818
Due to connection pooling, Serverless SQL Databases currently only support transaction-scoped settings and requires using a single PostgreSQL role for all queries (the internal `role_readwrite` in PostgreSQL).
1919

20+
<Macro id="requirements" />
21+
2022
- A Scaleway account logged into the [console](https://console.scaleway.com)
2123
- [Owner](/identity-and-access-management/iam/concepts/#owner) status or [IAM permissions](/identity-and-access-management/iam/concepts/#permission) allowing you to perform actions in the intended Organization
2224
- [Created a Serverless SQL Database](/serverless/sql-databases/how-to/create-a-database/)

serverless/sql-databases/how-to/use-row-level-security.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
meta:
3-
title: How to use Row Level Security with Serverless SQL Database
4-
description: This page explains how to use Row Level Security with Serverless SQL Databases
3+
title: How to use Row-Level Security with Serverless SQL Database
4+
description: This page explains how to use Row-Level Security with Serverless SQL Databases
55
content:
6-
h1: How to use Row Level Security with Serverless SQL Database
7-
paragraph: This page explains how to use Row Level Security with Serverless SQL Databases
6+
h1: How to use Row-Level Security with Serverless SQL Database
7+
paragraph: This page explains how to use Row-Level Security with Serverless SQL Databases
88
tags: sql-databases serverless database row-level-security postgresql postgrest
99
dates:
1010
validation: 2024-09-24
@@ -15,7 +15,7 @@ categories:
1515

1616
Row-Level Security is a database security mechanism that allows access only to specific rows of a table based on a user's role or permissions.
1717

18-
Row Level Security can be actived with Serverless SQL Databases for a maximum of two different roles, having both read and write permissions. This can be used to restrict access to a subset of users with frameworks or tools such as [PostgREST](https://docs.postgrest.org/en/v12/).
18+
Row-Level Security can be activated with Serverless SQL Databases for a maximum of two different roles, having both read and write permissions. This can be used to restrict access to a subset of users with frameworks or tools such as [PostgREST](https://docs.postgrest.org/en/v12/).
1919

2020
This requires setting up different [IAM permissions sets](/identity-and-access-management/iam/reference-content/permission-sets/) for each role (**ServerlessSQLDatabaseFullAccess** or **ServerlessSQLDatabaseReadWrite** for one role, and **ServerlessSQLDatabaseDataReadWrite** for the other).
2121

@@ -38,7 +38,7 @@ This requires setting up different [IAM permissions sets](/identity-and-access-m
3838
INSERT INTO pets VALUES ('Stuart','role_admin',1),('Nemo','role_admin',2),('Alfie','role_readwrite',3),('Peanut','role_readwrite',4);
3939
```
4040

41-
3. Run the command below to enable **Row Level Security**:
41+
3. Run the command below to enable **Row-Level Security**:
4242
```sql
4343
ALTER TABLE pets ENABLE row level security;
4444
```
@@ -55,7 +55,7 @@ This requires setting up different [IAM permissions sets](/identity-and-access-m
5555
All the data contained in the database displays, as you are connected with `role_admin`.
5656

5757
<Message type="tip">
58-
You can verify the current role your are connected with using the following command:
58+
You can verify the current role you are connected with using the following command:
5959
```sql
6060
SELECT current_user;
6161
```
@@ -83,7 +83,7 @@ This requires setting up different [IAM permissions sets](/identity-and-access-m
8383
Only the pets with a `keeper` column value of `role_readwrite` display. Your new application can now only access a specific subset of rows based on its permissions.
8484

8585
<Message type="tip">
86-
Row level security and policies can be created or deleted by a table owner. In this example, you can check table owner with the following command:
86+
Row-level security and policies can be created or deleted by a table owner. In this example, you can check the table owner with the following command:
8787
```sql
8888
select * from pg_tables where tablename = 'pets';
8989
```

0 commit comments

Comments
 (0)