Using Strapi roles and permissions
Going back to the main actor use case diagram in Chapter 2, Building Our First API, the main actors in the API are Students, Teachers, and Admins.
As illustrated in the diagram, each user (role) should have certain permissions to interact with the API entities. For example, Teachers can create tutorials and edit their own tutorials but not others, and they cannot create classrooms. Students can view a tutorial but cannot create one, while Admins can perform all CRUD (short for Create, Read, Update, and Delete) operations. The following table puts all those permissions into perspective with the tutorial and classroom content-types:
Based on this table, it is clear that we need to define three roles in our API. Let's do that now.
Creating the Student role
The first role we will create is the Student role...