Let admins preview unpublished course content in the dashboard#441
Merged
Conversation
- Admins see the course, modules and lessons regardless of published state, with amber Draft badges marking unpublished items - Admins bypass the purchase gate so they can preview Pro lessons - Unpublished lessons now 404 for non-admins (previously accessible by slug) - Dashboard course heading is now 'The NativePHP Masterclass' Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
simonhamp
marked this pull request as ready for review
July 23, 2026 18:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Admins (per
FILAMENT_USERS) can now see the full course content in the Dashboard → Course section regardless of published state:is_publishedfor admins — on the course index, the lesson page sidebar, and prev/next navigation.Why
Course content is being produced and published incrementally. Admins need to preview draft modules and lessons in the real customer-facing UI before flipping them live.
Also
Tests
4 new tests in
CourseContentTestcovering: admin sees unpublished content, non-admin owners still don't, admin can open an unpublished Pro lesson without purchase, and unpublished lessons 404 for non-admins. Full file (19 tests) plusCoursePageTestandHomeCourseCardTestpass.🤖 Generated with Claude Code