From a50d988f9b9b5b3cc46df0eea59ffe607b3a1856 Mon Sep 17 00:00:00 2001 From: smuddyx Date: Sun, 22 Mar 2020 15:34:17 +0100 Subject: [PATCH] fix: public var in component --- firestore.rules | 17 +++++++++-------- src/app/modules/songs/song/song.component.ts | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) 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,