Hide the My Lessons menu for users who already see Scheduler #86

Merged
thatguygriff merged 1 commits from fix/hide-my-lessons-menu into main 2026-07-22 14:19:05 +00:00
Owner

Closes #85

Follow-up demo feedback: Scheduler and My Lessons looked nearly identical in wp-admin. Scheduler (view_all_lessons) renders the same template with every instructor's lessons — including the caller's own and the same HST / e-transfer edit forms — so for an owner-operator studio the two menu items duplicated each other.

The My Lessons menu item is now only registered for users without view_all_lessons. Plain instructors keep My Lessons exactly as before; studio admins see just Scheduler. The page callback itself is untouched, so nothing else changes.

  • composer test — 408 tests pass; composer lint (PHPStan level 10) and composer cs clean.
  • Docs updated: docs/features/lesson-booking.md.

🤖 Generated with Claude Code

Closes #85 Follow-up demo feedback: **Scheduler** and **My Lessons** looked nearly identical in wp-admin. Scheduler (`view_all_lessons`) renders the same template with every instructor's lessons — including the caller's own and the same HST / e-transfer edit forms — so for an owner-operator studio the two menu items duplicated each other. The **My Lessons** menu item is now only registered for users **without** `view_all_lessons`. Plain instructors keep My Lessons exactly as before; studio admins see just Scheduler. The page callback itself is untouched, so nothing else changes. - `composer test` — 408 tests pass; `composer lint` (PHPStan level 10) and `composer cs` clean. - Docs updated: `docs/features/lesson-booking.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
thatguygriff added 1 commit 2026-07-22 14:11:24 +00:00
Hide the My Lessons menu for users who already see Scheduler
CI / Tests (PHP 8.1) (pull_request) Successful in 42s
CI / Tests (PHP 8.2) (pull_request) Successful in 39s
CI / No Debug Code (pull_request) Successful in 1s
CI / Coding Standards (pull_request) Successful in 2m46s
CI / PHPStan (pull_request) Successful in 2m49s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m34s
CI / Build Plugin Zip (pull_request) Skipped
e324c5d585
Scheduler (view_all_lessons) is a superset of My Lessons — same template,
every instructor's lessons, same payment edit forms — so for an
owner-operator both menu items showed the same data twice. The My Lessons
menu item is now only registered for users without view_all_lessons;
instructors are unaffected.

Closes #85

Co-Authored-By: Claude Fable 5 <[email protected]>
thatguygriff merged commit c9eaa6f3bc into main 2026-07-22 14:19:05 +00:00
thatguygriff deleted branch fix/hide-my-lessons-menu 2026-07-22 14:19:05 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Unsupervised/unsupervised-scheduler#86