gocodebox / lifterlms

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

Unable to access all courses with Editor (and possibly other) roles via Unrestricted Preview Access #2740

Closed brianhogg closed 2 months ago

brianhogg commented 2 months ago

Reproduction Steps

  1. Add roles in LifterLMS dashboard → Settings → General Settings → Unrestricted Preview Access → Add Editor Role.
  2. Create A course, add prerequisite restrictions, or drip. Or Simply don't enroll in the course.
  3. Create a User with an Editor Role, then Switch to that user
  4. Try to access the Course.

Expected Behavior

When you switch to a user who has Editor Role, you should be able to bypass the enrollment, prerequisite restriction and drip for courses and Membership. Even you're not enrolled in the course.

Actual Behavior

It still asks to be enrolled in the course.

This issue has been recreated:

• Locally • On a staging site

brianhogg commented 2 months ago

Duplicate of https://github.com/gocodebox/lifterlms/issues/2180