From 0d778102402892758ede5f2546ade3ef85b28465 Mon Sep 17 00:00:00 2001 From: Pradip Khadka Date: Sat, 3 Nov 2018 21:32:20 +0545 Subject: [PATCH] Initialized example file for api configs --- database.rules.json.tmp | 29 +++++++++++++++++++++++++ src/admin/firebase_config/config.js.tmp | 10 +++++++++ 2 files changed, 39 insertions(+) create mode 100644 database.rules.json.tmp create mode 100644 src/admin/firebase_config/config.js.tmp diff --git a/database.rules.json.tmp b/database.rules.json.tmp new file mode 100644 index 0000000..9699e50 --- /dev/null +++ b/database.rules.json.tmp @@ -0,0 +1,29 @@ +{ + "rules": { + ".write": "auth.uid === 'yourUID'", + ".read": true, + "settings": { + ".validate": true + }, + "media": { + "$id": { + // ".write": "auth != null && auth.uid == $uid && root.child('users').child(auth.uid).child('role').val() === 'admin' " + } + }, + "nav": { + ".validate": true + }, + "fields": { + ".validate": true + }, + "contents": { + ".validate": true + }, + "routes": { + ".validate": true + }, + "$other": { + ".validate": false + } + } +} diff --git a/src/admin/firebase_config/config.js.tmp b/src/admin/firebase_config/config.js.tmp new file mode 100644 index 0000000..a784eff --- /dev/null +++ b/src/admin/firebase_config/config.js.tmp @@ -0,0 +1,10 @@ +const config = { + apiKey: '', + authDomain: '', + databaseURL: '', + projectId: '', + storageBucket: '', + messagingSenderId: '' +} + +export default config