Now let's explain what just happened in the preceding rules:
- We're trying to protect user-related media, so to do that we've created a new route with two dynamic parameters: the usersId for authentication management, and image id as well. In the first two match we're using the allow rule so we can simply allow the reading of our images and book in case we're authenticated and the request uid matched the one from the user asking for them.
- In the second two-match we're doing some content type management, so if we're securing the images, we need to make sure that images inside that section of the bucket are in fact images and the same thing with books. We're also making some size management, and checking if the image or the ...