From the course: Angular: Cloud-Powered Apps with Firebase

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

Cloud Storage security rules

Cloud Storage security rules

- [Male Narrator] As of now, any authenticated user will be able to upload files. While this may work for many applications, in our specific scenario, users will be uploading their profile image at a specific location in our storage bucket. We only want that user to have read and write access to that location. We will also be working on an Atom interface to allow a user with an administrator role to access this as well. We'll be uploading the user images to a specific path to the users ID so we can change the match location. Match, forward slash users, the user ID, and then the file name. In addition, we want to allow read and write to that location if the authenticated user matches that ID. This will prevent a user from writing to a location that doesn't belong to that user. We can do that by checking the request.auth.uid and check that that matches the user ID of the location that they are trying to write to. We also…

Contents