Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev inside #74

Merged
merged 8 commits into from
Mar 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build-job:
docker:
# specify the version you desire here
- image: circleci/node:10.15.2
- image: circleci/node:12.4

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:

deploy-job:
docker:
- image: circleci/node:10.15.2
- image: circleci/node:12.4
working_directory: ~/repo
steps:
- restore_cache:
Expand Down
4 changes: 4 additions & 0 deletions firebase-rules/firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"indexes": [],
"fieldOverrides": []
}
48 changes: 48 additions & 0 deletions firebase-rules/firestore.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {

// This rule allows anyone on the internet to view, edit, and delete
// all data in your Firestore database. It is useful for getting
// started, but it is configured to expire after 30 days because it
// leaves your app open to attackers. At that time, all client
// requests to your Firestore database will be denied.
//
// Make sure to write security rules for your app before that time, or else
// your app will lose access to your Firestore database
match /apiEnd/{apiEndpoint}{
allow create : if true;
allow read : if request.auth.uid != null;
allow delete : if request.auth.uid != null;
allow update : if request.auth.uid != null;
allow list: if request.auth.uid != null;
}
match /teamOnboard/{doc}{
allow create : if true;
allow read : if true;
allow delete : if true;
allow update : if true;
allow list: if true;
}
match /users/{database}{
allow create : if true;
allow read : if true;
allow delete : if request.auth.uid != null && get(/databases/$(database)/documents/users/$(request.auth.uid)).data.userType == "Super Admin";
allow update : if request.auth.uid != null && get(/databases/$(database)/documents/users/$(request.auth.uid)).data.userType == "Super Admin";
allow list: if true;
}
match /team/{database}{
allow create : if request.auth.uid != null && get(/databases/$(database)/documents/users/$(request.auth.uid)).data.userType == "Super Admin";
allow read : if true;
allow delete : if request.auth.uid != null && get(/databases/$(database)/documents/users/$(request.auth.uid)).data.userType == "Super Admin";
allow update : if true;
allow list: if true;
}
match /{document=**} {
allow read : if true;
allow delete : if request.auth.uid != null && get(/databases/$(database)/documents/users/$(request.auth.uid)).data.userType == "Super Admin";
allow create : if request.auth.uid != null;
allow update : if request.auth.uid != null;
}
}
}
8 changes: 8 additions & 0 deletions firebase-rules/storage.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth!=null;
}
}
}
19 changes: 12 additions & 7 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
"rewrites": [{
"source": "**",
"destination": "/index.html"
}]
},
"firestore": {
"rules": "firebase-rules/firestore.rules",
"indexes": "firebase-rules/firestore.indexes.json"
},
"storage": {
"rules": "firebase-rules/storage.rules"
}
}
}
1 change: 0 additions & 1 deletion functions/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions functions/index.js

This file was deleted.

246 changes: 0 additions & 246 deletions functions/modules/team.js

This file was deleted.

Loading