diff --git a/firestore.rules b/firestore.rules index 77dce4c..acfb921 100644 --- a/firestore.rules +++ b/firestore.rules @@ -7,21 +7,22 @@ service cloud.firestore { } match /songs/{song} { - allow read: if true; - allow write: if true; + allow read: if request.auth.uid != null; + allow write: if request.auth.uid != null; } match /songs/{song}/files/{file} { - allow read: if true; - allow write: if true; + allow read: if request.auth.uid != null; + allow write: if request.auth.uid != null; } match /shows/{show} { - allow read: if true; - allow write: if true; + allow read: if request.auth.uid != null; + allow write: if request.auth.uid != null; } match /shows/{show}/songs/{song} { - allow read: if true; - allow write: if true; + allow read: if request.auth.uid != null; + allow write: if request.auth.uid != null; } } } + diff --git a/src/app/modules/songs/song/song.component.ts b/src/app/modules/songs/song/song.component.ts index a0a459a..090cf57 100644 --- a/src/app/modules/songs/song/song.component.ts +++ b/src/app/modules/songs/song/song.component.ts @@ -17,7 +17,7 @@ import {User} from '../../../services/user'; export class SongComponent implements OnInit { public song$: Observable; public files$: Observable; - private user$: Observable; + public user$: Observable; constructor( private activatedRoute: ActivatedRoute,