Develop Mini Blog with Directus - Part 3
directus | Directus, Headless CMS NextJS | 2024-10-22
Pre-requisite
- Basic understanding about Directus and NextJS
Mini Blog Series
We are preparing access permission for NextJS AppWhat access policies to setup?
First we need to understand the goal - the goal is to allow NextJS to consume the blog content and images.
Hence, we know there are 2 collections to set in Directus access policies.
Set directus_files to Public policy with READ access
Create a new policy name Presentation
Set blog with READ access, without App and Admin Access
Create a Role, name Presentation and adopt Presentation Policy
Lastly, create a bot user, set
- Status = Active
- Role = Presentation
- Generate security token
Keep the security token, that will be use for NextJS to communicate with Directus CMS.