mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
5
RULES.md
5
RULES.md
@@ -1,6 +1,7 @@
|
||||
# Firetable Rules
|
||||
|
||||
Firetable uses a Role based access control on top of firestore rules you
|
||||
Firetable uses a Role based access control on top of
|
||||
[firestore rules](https://firebase.google.com/docs/firestore/security/get-started).
|
||||
|
||||
## Firestore Rules Base
|
||||
|
||||
@@ -63,7 +64,7 @@ import * as admin from "firebase-admin";
|
||||
const projectId = "YOUR FIREBASE PROJECT ID HERE";
|
||||
console.log(`Running on ${projectId}`);
|
||||
// you can get the admin sdk service account key from the url bellow, remember to add your project Id
|
||||
//https://console.firebase.google.com/u/0/project/{{PORJECT_ID}}/settings/serviceaccounts/adminsdk
|
||||
//https://console.firebase.google.com/u/0/project/_/settings/serviceaccounts/adminsdk
|
||||
var serviceAccount = require(`./firebase-service-account.json`);
|
||||
admin.initializeApp({
|
||||
credential: admin.credential.cert(serviceAccount),
|
||||
|
||||
@@ -50,8 +50,8 @@ Read more about firebase rules for firetable
|
||||
|
||||
### Setting user Roles
|
||||
|
||||
Download the admin key for your project then add it to the directory without
|
||||
renaming it. You can find your service account here:
|
||||
Download the service account key for your project then add it to the directory
|
||||
without renaming it. You can find your service account here:
|
||||
https://console.firebase.google.com/u/0/project/_/settings/serviceaccounts/adminsdk
|
||||
|
||||
```
|
||||
|
||||
@@ -216,7 +216,7 @@ program
|
||||
|
||||
const adminSDKFilePath = await findFile(
|
||||
/.*-firebase-adminsdk.*json/,
|
||||
`Can not find the firebase service account key json file, download the admin key for your project then add it to this directory without renaming it.\nYou can find your service account here: https://console.firebase.google.com/u/0/project/${projectId}/settings/serviceaccounts/adminsdk`
|
||||
`Can not find the firebase service account key json file, download the service account key for your project then add it to this directory without renaming it.\nYou can find your service account here: https://console.firebase.google.com/u/0/project/${projectId}/settings/serviceaccounts/adminsdk`
|
||||
);
|
||||
// let directory = await directoryCheck();
|
||||
// if (!directory) return;
|
||||
@@ -257,7 +257,7 @@ program
|
||||
// check directory for admin sdk json
|
||||
const adminSDKFilePath = await findFile(
|
||||
/.*-firebase-adminsdk.*json/,
|
||||
`Can not find the firebase service account key json file, download the admin key for your project then add it to this directory without renaming it.\nYou can find your service account here: https://console.firebase.google.com/u/0/project/${projectId}/settings/serviceaccounts/adminsdk`
|
||||
`Can not find the firebase service account key json file, download the service account key for your project then add it to this directory without renaming it.\nYou can find your service account here: https://console.firebase.google.com/u/0/project/${projectId}/settings/serviceaccounts/adminsdk`
|
||||
);
|
||||
|
||||
var serviceAccount = fs.readFileSync(adminSDKFilePath, {
|
||||
|
||||
Reference in New Issue
Block a user