Your authentication does not return the user role? Fix that or at least demonstrate how to retrieve the role as well
@thinkdigital20432 жыл бұрын
Great video, loved it. Can you please do a tutorial on registration with the email confirmation turned to true? I would highly appreciate that
@lindsayaiello501 Жыл бұрын
Is there a way authenticate specific blog articles, not the whole content type? Apparently this is built in with WordPress.
@Strapi Жыл бұрын
You can have isPrivate boolean in the article collection type and use middleware to check if user is authorized and returned all articles that have the isPrivate boolean. But you can add what ever logic you need to accomplish your use case via middleware. Here is a simple example of one I did here: github.com/PaulBratslavsky/strapi-remix-starter/blob/main/backend/src/api/article/middlewares/articles-middleware.js
@lindsayaiello501 Жыл бұрын
@@Strapi thank you. I ended doing something like that (thanks to your code!) in the controller findOne and it is working. My goal is to allow the find method on all articles (including isPrivate == true) to all audiences so my UI can show all article cards. But some articles the user needs to be logged in for findOne. Does it make sense to have that condition in the controller? I think I tried in policy and in middleware and I could not get it working for some reason.
@richleach1982 жыл бұрын
Can anyone confirm the video immediately preceding this one in the series? I just watched 3. Adding content through the Strapi Admin UI, but in this video he's using a Postman-like tool called Insomnia and it appears that I've missed a few steps....
@martiandesertboy Жыл бұрын
idk if this is still relevent but u need to do ur own research on insomnia i did, it was pretty easy to get the gist of it
@Brandon-sr4qp Жыл бұрын
For anyone wondering how to do this in postman... You also must change that 'raw' body to JSON instead of Text. kzbin.info/www/bejne/rqeYhYqGaNl2gdU
@SHAVJW8 ай бұрын
Does this work for other JavaScript frameworks as well?