Skip to content

Commit

Permalink
added rules for user status
Browse files Browse the repository at this point in the history
  • Loading branch information
jitendraashutec committed Sep 12, 2019
1 parent 7e46a4f commit 1352120
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion firestore-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ service cloud.firestore {
// only allow login user to read and get it
// logged in user does not have rights to modify this document
// document can only be modified by API , triggers
allow get: if true;
allow get: if isUserAuthenticated(userId);
}

}
Expand Down
2 changes: 2 additions & 0 deletions projects/shared-library/src/lib/core/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ export class UserService {
.pipe(map(u => {
user.online = (u) ? u.online : false;
return user;
}, (error) => {
return user;
}));
}

Expand Down

0 comments on commit 1352120

Please sign in to comment.