0

I am trying to create an application with React and Firebase. I am new in Firebase and I have a problem with User Roles. How we can define user roles of system_users, how do I know if user is admin or just a client. Based on that I need to show different part of pages in the web. How can I save different roles for users ? Attached you can find the system_users part in Firebase, how to differentiate these users as admin or client.enter image description here

KENdi
  • 7,576
  • 2
  • 16
  • 31
edonbajrami
  • 2,196
  • 24
  • 34
  • Can you be more specific? What defines user roles? Can you share your Firebase structure for your users (as text please, no images)? How are you defining admin or clients? – Jay Jul 02 '17 at 15:02
  • @Jay I have added the image. I just want to add user roles also, is it admin user or client user. I am using createUserWithEmailAndPassword function to create users in Firebase. – edonbajrami Jul 02 '17 at 15:11
  • ugh. Please READ. *as text please, no images* 'We' don't like retyping structures as it takes a lot of time when it could be copied and pasted as text. – Jay Jul 02 '17 at 15:21
  • See [this question](https://stackoverflow.com/questions/44866220/how-to-read-write-from-one-ios-app-set-up-with-firebase-to-another-firebase-dat?noredirect=1#comment76723140_44866220) and the answer I just wrote. There's some swift code and the actual questions are different but the concepts in the answer matches what you are asking. – Jay Jul 02 '17 at 15:25
  • Thanks @Jay it was very helpful :) – edonbajrami Jul 02 '17 at 20:52

0 Answers0