Closed cirilinfo closed 3 years ago
You will need to create only one collection SMS_ROLES so that your app can authenticate users against roles. rest of the collections will automatically be created as your access app write data into database. Please look into screenshots. https://medium.com/@Amit_Shukla/online-school-management-app-8e58449427c0
Hi, i have log in the app but unable to do the settings find my screenshot and let me know the solutions.
can you try changing this collection (as mentioned below) and see if the solves the issue, and if does, please try adding conditions back one at a time and see which condition is failing.
-----AFTER match /SMS_USERS/{document} { allow create: if true; allow update: if true; allow read: if true; } --------------------BEFORE match /SMS_USERS/{document} { allow create: if exists(/databases/$(database)/documents/SMS_ROLES/$(request.resource.data.secretKey)) && get(/databases/$(database)/documents/SMS_ROLES/$(request.resource.data.secretKey)).data.role == request.resource.data.role; allow update: if exists(/databases/$(database)/documents/SMS_ROLES/$(request.resource.data.secretKey)) && get(/databases/$(database)/documents/SMS_ROLES/$(request.resource.data.secretKey)).data.role == request.resource.data.role && isDocOwner(); allow read: if isSignedIn() && isDocOwner(); }
same issue
why you have match /SMS_USERS/{document} rules twice line #7 and line #12 You need to keep only one set (means, get rid of line #12 through #19)
i have removed one set but still facing the same issue
I will download this repository and run this later this week. Please expect a fix by Monday. Also, FYI - I have a new series coming up this week, where I discuss how to setup Firebase rules and Role based security in detail. Please subscribe https://www.youtube.com/amitshukla_ai and give a star to this repository https://github.com/AmitXShukla/ERP-Apps-CRM-Cloud-Angular_FireStore
@AmitXShukla any update on the firebase ROLE issue.
Sorry to keep you waiting, I'm busy with other project.
For now, just update every thing to true (not recommended approach for sure) and I will update these rules later this week.
allow create: if true; allow update: if true; allow read: if true;
@AmitXShukla i have set everything true but still having same issues.
Can you please include some screenshots of errors from web and terminal console. I have this repository open, will fix it all at once.
@AmitXShukla find the screenshots for your reference
Temporary fix for You is, Set everything to true In your collections, only user roles is true, rest aren’t.
To learn more about how to setup rules, please watch this video
I’ll fix this repository once I finish my current project.
update this repo to latest Angular 9.1.4 version, Please download and re-install this app
update this repo to v 11.0
Hi, I have used the firebase roles but tables not generate. How to generate tables in firebase.