gocodebox / lifterlms

LifterLMS, a WordPress LMS Solution: Easily create, sell, and protect engaging online courses.
https://lifterlms.com
GNU General Public License v3.0
182 stars 135 forks source link

Contextual Personas on top of Sitewide Roles #611

Open actual-saurabh opened 6 years ago

actual-saurabh commented 6 years ago

This can be extended to create Object specific roles (called Personas) which would be a collection of capabilities just like Roles stored in wp_postmeta.

This can be further extended to provide personal capabilities specific to an object stored in wp_llms_user_postmeta.

At any given point during the course experience or administration, the users' total capabilities would be a result of all the above. This would allow very granular and simple permission and privacy management at every level. This would make it easy to create extremely flexible and drippable permission and privacy module in LifterLMS for courses and memberships.

actual-saurabh commented 6 years ago

In addition, similar to WordPress's builtin hierarchy of User Roles, LifterLMS can have a builtin hierarchical User Personas.

Using this hierarchy, we can built a Persona Switcher similar to the current View As functionality. The higher Persona would be able to switch to a lower Persona to experience the Course or Administration.

As an example, let's say if these are the personas for a course in decreasing hierarchy, each Persona has all permissions of the lower one):

  1. Admin (can do everything on the course including changing personas of users)
  2. Editor (Manager) (can do everything on the course excluding changing personas of users)
  3. Course Author/ Instructor (can only edit content & some types of metadata)
  4. Course Instructor (can receive notifications and interact with users through Comment API based functionality, can assess assignments, etc)
  5. Course Assistant Instructor (can receive notifications and interact with users, provide support, manage reports etc)
  6. Student (can experience the course)

A Course Admin can easily switch to any persona. Editor can switch to all other personas except Admin and so on. Finally, a Student cannot switch the persona at all.