strapi / starters-and-templates

Monorepo for all official Strapi v4 templates
MIT License
327 stars 117 forks source link

Update bootstrap.js to create API token and proper permissions for gatsby-blog #54

Closed chadwcarlson closed 1 year ago

chadwcarlson commented 2 years ago

I haven't yet had a chance to test this on the other backend/frontend starters, so maybe this should be labelled as a WIP.

The gatsby-blog starter requires an API token, which is not set automatically, creating a bumpy first start-up. Also, I think that Authenticated permissions were missing within bootstrap to get it working.

This change generalizes the setPublicPermissions method to setInitPermissions where role can be passed along with the permissions object. A new method is added setInitFrontendAPIToken, which creates a full-access token type and writes the resulting access key to backend/env.development.

Caveats:

Resolves https://github.com/strapi/starters-and-templates/issues/38 I believe

remidej commented 1 year ago

Closing as stale