Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update README with detailed instructions for role and RLS policy management #8

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

alexosugo
Copy link
Collaborator

No description provided.

@alexosugo alexosugo requested a review from Benmuiruri February 18, 2025 10:27
Copy link

@Benmuiruri Benmuiruri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this improved README. A couple of suggestions and questions

README.md Outdated

## Creating RLS policies

The process is similar to the one above for creating roles. The `group key` and `clause` are the important bits here and should be configured accordingly. They determine what level of access the role will have. For example, the clause 'county_name' = '{{county_name}}' will allow the role to access data from the specified county.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Add an example JSON payload for how to create RLS Policy

README.md Outdated
}
```

Next, update the permissions for the roles. Subsequent roles for individual types will be copied off of these `base` roles.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: should we describe how to update the permissions for the roles on the UI ? Or via API ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API for now. Doing it via the UI can introduce unwanted changes due to how the permissions UX is presented.

alexosugo and others added 5 commits February 19, 2025 16:12
Co-authored-by: Ben Kiarie <[email protected]>
Co-authored-by: Ben Kiarie <[email protected]>
Co-authored-by: Ben Kiarie <[email protected]>
Co-authored-by: Ben Kiarie <[email protected]>
@alexosugo alexosugo requested a review from Benmuiruri February 20, 2025 10:21
Copy link

@Benmuiruri Benmuiruri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more suggestion. I thought I had shared it yesterday.

Thank you for adding the json for roles and rls policies.

Comment on lines +6 to +10

Clone the repository and install the dependencies:
```bash
npm install
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Clone the repository and install the dependencies:
```bash
npm install
```
1. Clone the repository.
2. install the dependencies: `npm install`
3. Create a `data` folder in the root of the repository
3. Add your csv file to the data folder, refer to the `./src/template.csv` for a sample.
2. Define your environment variables - make a copy of `.env.template` and rename to `.env`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants