php - User Access Permissions -


i trying figure out best way configure db / check user permissions give them access site content.

our product udemy or other online teaching platform. have multiple instructors can have multiple courses. user signs , gets access courses.

way can configure logic user can see courses signed , instructors can see courses teaching.

thank you!

presumably have database table users , database table courses.

add associative tables teaching , student_on relationships.

then can along lines of:

select course.name, course.id      student_on, course      (student_on.student_id = ? , student_on.course_id = course.id) ; 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -