From 4050f2c9cf8bd2ffa2ee78848fed6fe8a365c067 Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Thu, 9 Nov 2023 19:02:21 -0300 Subject: [PATCH 1/4] Improve Prismic documentation styling --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5f3942257b..4b8decc528 100644 --- a/README.md +++ b/README.md @@ -317,11 +317,9 @@ If the feature you are working on depends on Google's Geocoding API, please add GOOGLE_MAPS_API_KEY=XXXXXXXXXXXX ``` -### Prismic setup +## Prismic setup This project uses Prismic to fetch page content. You can still run the project without setting a Prismic account. -#### Prismic Setup - 1. Sign up for a new [Prismic](https://prismic.io/) account or log in to your account if you already have one 2. In `Create a new repository` section choose `Something else` 3. Give your repository a name and choose `gatsby` in the technology dropdown @@ -329,12 +327,12 @@ This project uses Prismic to fetch page content. You can still run the project w 5. Click `Create repository` 6. Create a new token in Settings > API & Security > Content API tab > Change Repository security to `Private API – Require an access token for any request` > Create new app > Permanent access tokens > Save value for later -#### Adding the Prismic content types +### Adding the Prismic content types -## Prismic Custom Types -You can find the list of all custom types in the folder custom_types +#### Prismic Custom Types +You can find the list of all custom types in the folder `custom_types` -## How to create a new Custom Type +#### How to create a new Custom Type 1. From the prismic left menu click `Custom Types` 2. Click `Create new custom type` 3. Give it a name (name of the json in custom_types folder) @@ -356,13 +354,13 @@ You can find the list of all custom types in the folder custom_types In order for your recently published Prismic content to be available on your page, a Netlify build needs to be triggered. In order to do this, you need to create a Netlify Build Hook. -**Prismic environment variables** +#### Prismic environment variables Add the following environment variable on Netlify: `GATSBY_PRISMIC_REPO_NAME=[name_of_your_repository]` (step 3 from Prismic Setup section) `PRISMIC_ACCESS_TOKEN=[you_prismic_access_token]` (step 6 from Prismic Setup section) -**Create Prismic/Netlify Hook** +#### Create Prismic/Netlify Hook 1. Login to your Netlify 2. Go to `Deploys` 3. Go to `Deploy settings` From 0946c297279214742a0d8ec79259fc223f77f9dc Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Thu, 9 Nov 2023 19:58:25 -0300 Subject: [PATCH 2/4] Add User Roles documentation --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 4b8decc528..88c0b9a74a 100644 --- a/README.md +++ b/README.md @@ -375,6 +375,24 @@ Add the following environment variable on Netlify: 12. In `Triggers` select `A document is published` and `A document is unpublished` 13. Click `Add this webhook` +## User Roles + +All site users have one or more roles assigned to them. The role determines what actions the user can take on the site. + +As soon as a user is signed in, the system assign a `subscriber` role as default. Role assignment is handled manually by the site administrators. + +**The roles are:** + +| User Role | Permissions | +|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------| +| `subscriber` | This is the default role assigned to all users. It allows the user to subscribe to new incidents, specific incidents, entities, and anything else that is subscribeable. | +| `submitter` | This role allows the user to submit new incidents under their user account. | +| `incident_editor` | This role allows the user to:
- Edit and clone incidents
- See the live incident data
- Add, edit, approve and delete Variants
- View and submit incident candidates
- Restore previous versions of incidents and reports. | +| `taxonomy_editor` | This role allows the user to edit all taxonomies. | +| `taxonomy_editor_{taxonomy_name}` | This role allows the user to edit a specific taxonomy. ie: `taxonomy_editor_csetv1` role allows the user to edit the `CSETv1` taxonomy. | +| `admin` | This role has full access to the site, including the ability to edit users' roles. | + + ## Front-end development ### Tailwind CSS & Flowbite From bb77ac72965a28e6b1594a22da90901beecd7580 Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Thu, 9 Nov 2023 20:31:43 -0300 Subject: [PATCH 3/4] Add "live data" definition --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 88c0b9a74a..d76d6f95c0 100644 --- a/README.md +++ b/README.md @@ -387,7 +387,7 @@ As soon as a user is signed in, the system assign a `subscriber` role as default |-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------| | `subscriber` | This is the default role assigned to all users. It allows the user to subscribe to new incidents, specific incidents, entities, and anything else that is subscribeable. | | `submitter` | This role allows the user to submit new incidents under their user account. | -| `incident_editor` | This role allows the user to:
- Edit and clone incidents
- See the live incident data
- Add, edit, approve and delete Variants
- View and submit incident candidates
- Restore previous versions of incidents and reports. | +| `incident_editor` | This role allows the user to:
- Edit and clone incidents
- See the live incident data. The live data is the data that is currently stored in the database. Keep in mind that the Incident page is generated on each build, so if a user edits an incident, the change will be only visible if the live data options is activated until the next build finishes.
- Add, edit, approve and delete Variants
- View and submit incident candidates
- Restore previous versions of incidents and reports. | | `taxonomy_editor` | This role allows the user to edit all taxonomies. | | `taxonomy_editor_{taxonomy_name}` | This role allows the user to edit a specific taxonomy. ie: `taxonomy_editor_csetv1` role allows the user to edit the `CSETv1` taxonomy. | | `admin` | This role has full access to the site, including the ability to edit users' roles. | From 8d1d0147fc72a9cd66968f535c47c44d4bac0dd8 Mon Sep 17 00:00:00 2001 From: Pablo Costa Date: Mon, 13 Nov 2023 13:51:28 -0300 Subject: [PATCH 4/4] Apply text suggestions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d76d6f95c0..40d13219c0 100644 --- a/README.md +++ b/README.md @@ -379,7 +379,7 @@ Add the following environment variable on Netlify: All site users have one or more roles assigned to them. The role determines what actions the user can take on the site. -As soon as a user is signed in, the system assign a `subscriber` role as default. Role assignment is handled manually by the site administrators. +As soon as a user is signed in, the system assigns a `subscriber` role by default. Role assignment is handled manually by the site administrators. **The roles are:** @@ -387,7 +387,7 @@ As soon as a user is signed in, the system assign a `subscriber` role as default |-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------| | `subscriber` | This is the default role assigned to all users. It allows the user to subscribe to new incidents, specific incidents, entities, and anything else that is subscribeable. | | `submitter` | This role allows the user to submit new incidents under their user account. | -| `incident_editor` | This role allows the user to:
- Edit and clone incidents
- See the live incident data. The live data is the data that is currently stored in the database. Keep in mind that the Incident page is generated on each build, so if a user edits an incident, the change will be only visible if the live data options is activated until the next build finishes.
- Add, edit, approve and delete Variants
- View and submit incident candidates
- Restore previous versions of incidents and reports. | +| `incident_editor` | This role allows the user to:
- Edit and clone incidents
- See the live incident data. The live data is the data that is currently stored in the database. Keep in mind that incident pages are generated on each build, so if a user edits an incident, the change will be only visible if the live data options is activated until the next build finishes.
- Add, edit, approve and delete incident variants
- View and submit incident candidates
- Restore previous versions of incidents and reports. | | `taxonomy_editor` | This role allows the user to edit all taxonomies. | | `taxonomy_editor_{taxonomy_name}` | This role allows the user to edit a specific taxonomy. ie: `taxonomy_editor_csetv1` role allows the user to edit the `CSETv1` taxonomy. | | `admin` | This role has full access to the site, including the ability to edit users' roles. |