Skip to content

Commit 66ffafe

Browse files
author
Your Name
committed
Firebase & AngularFire In Depth
1 parent 0fe0e0c commit 66ffafe

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/app/app-routing.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const routes: Routes = [
2828
{
2929
path: 'create-course',
3030
component: CreateCourseComponent,
31-
//canActivate: [AngularFireAuthGuard],
31+
canActivate: [AngularFireAuthGuard],
3232
data: {
3333
authGuardPipe: adminOnly
3434
}

src/environments/environment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
export const environment = {
66
production: false,
7-
useEmulators: false,
7+
useEmulators: true,
88
firebase: {
99
apiKey: "AIzaSyB9LOREMGhj1jpVXOHTKIwQu2oM7pVfjQg",
1010
authDomain: "fir-course-recording-c7f3e.firebaseapp.com",

storage.rules

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
rules_version = '2';
2+
23
service firebase.storage {
34

45
match /b/{bucket}/o {
56

6-
match /{allPaths=**} {
7-
allow read, write: if request.auth!=null;
7+
match /courses/{courseId}/{fileName} {
8+
9+
allow read;
10+
11+
allow write: if request.auth != null &&
12+
request.resource.size < 5 * 1024 * 1024;
13+
814
}
915

1016
}

0 commit comments

Comments
 (0)