jamstack-training-films-ui
jamstack-training-films-ui copied to clipboard
Can't login with authenticated users
Hello, I followed the course “Create your "next" app using Next.js and Strapi” and downloaded the two repositories at GitHub but I found an issue when I tried the users’ roles. I created a new authenticated user and changed the “find” and “findOne” permissions of “Film” and “Review” in the role setting for authenticated users only. But when I login by the new authenticated user and click on “Films” at the menu, it gives me the following error: TypeError: Cannot read properties of undefined (reading 'pagination')
Please how to solve this problem?

Hi @waheed11 - thank you for taking the course. Can you confirm that you're using Strapi v4 please?
Yes I am using Strapi v4
It works fine when I give “find” and “findOne” permissions of “Film” for "Public"
thank you for clarifying. I think I mention this at some point in the course as well. The films (and therefore the listing of all the films, including the meta prop used for pagination) is available to both logged in and logged out users, you need to make sure that you check both the public and authenticated roles' find and findOne checkboxes.
btw, as far as I know, Strapi currently doesn't automagically propagate these permissions but it'd be a nice features and it's something that I brought up for @malgamves.
we just launched a feedback portal at https://feedback.strapi.io - PMs are watching and would be surely added to the roadmap
@malgamves thank you providing a feedback. Could you please send the link of the feedback you have created