Levels of Users


I’ve seen this question on the forums but no clear indication on where to start.

I have two different levels of users:

  1. Teacher
  2. Student

The teacher will invite the student to join the app. The teacher will be able to access the student account and make changes to their info (name, email, etc).

The student will be able to access/change their own info, and also view a calendar shared by all the other students. But the admin of the calendar is the teacher, who can make changes to it.

So what I have set up right now is custom states based which allow students to see their own info, and teachers to see their own info. Is using custom states a good place to start in order to make this two-tier user system? Any videos or posts that you know of that could help me continue on with this?

Thank you!

Hi Maura,

Welcome to Bubble :slight_smile: There are a number of different ways to do this depending on how you want to set things up. I would probably have two separate pages – one for teachers, and one for students. I would create a user field called “type” that I would use to classify whether a user is a student or teacher. Then you could design the two different pages in whatever way you like for each type of user. If you wanted to keep everything on one page, you could definitely use custom states to hide/show different elements based on whether the current user is a teacher or student. But I think that approach would just provide more headaches down the road as your app gets more complex. Hope this helps.

Hey @jacobgershkovich! Thank you

Thanks for the tips, I’ve set up the field which distinguishes between “student” and “teacher”. I’ve also expanded my app to 3 pages because you’re right, it was cluttered on one page!

I’m trying to figure out how to link student accounts to their respective teacher accounts. How can I make sure that students only view their teacher’s calendar, and that teachers have access to only their students? Would you use another field in this case, maybe a unique ID that allows teachers/students to access info only if they are associated with that ID?

Thank you again!

One more thing to note.

Any list that is ‘fixed’ (ie not modified by users) should ideally come from an option set, in this case a user_type option set.

Sounds like you need a calendar page, and also a ‘events’ table, which will hold all of the events. When the event is created, this will store a list of users(students and teachers) that can search.