Typing a value past a fixed-size column's limit reported success but saved nothing — the DB quietly rejected the over-long row while the code returned 200/201. Added length guards for every free-text fixed-size field (enum columns are already whitelist-guarded):
REST endpoints reject over-long values with a 400; admin controllers refuse the insert; form inputs carry maxlength.
Limits are MAX_* constants on the value objects, kept in lockstep with the schema.
2. Students reaching the WordPress dashboard
New Auth\StudentAdminGuard redirects front-end-only users away from wp-admin and hides the admin toolbar for them. Access is decided by capability — administrators, studio admins, and instructors keep full wp-admin; anyone with only student capabilities is bounced. AJAX passes through. (The optional wp-login.php redirect was intentionally left out.)
3. Empty instructor picker for a solo studio owner
OfferingController::instructorOptions() queried only the us_instructor role, so a studio owner who teaches from a WordPress administrator account (the default single-account setup) never appeared. It now also queries administrator when adminsAreInstructors() is enabled, and excludes admins when that toggle is off.
Tests
New: QuestionEndpointTest, PolicyEndpointTest, StudentAdminGuardTest; additions to OfferingEndpointTest and OfferingControllerTest.
composer test (618 tests), composer lint (PHPStan L10), composer cs all pass.
Three bug fixes recorded under the **1.2.1** changelog section (no schema change, so no version bump).
### 1. Over-length fixed-size fields silently discarded
Typing a value past a fixed-size column's limit reported success but saved nothing — the DB quietly rejected the over-long row while the code returned 200/201. Added length guards for every free-text fixed-size field (enum columns are already whitelist-guarded):
- **Questions** `label` (VARCHAR 255), **Offerings** `title`/`schedule_note`/`etransfer_email` (191), **Policies** `title`/`slug` (191).
- REST endpoints reject over-long values with a 400; admin controllers refuse the insert; form inputs carry `maxlength`.
- Limits are `MAX_*` constants on the value objects, kept in lockstep with the schema.
### 2. Students reaching the WordPress dashboard
New `Auth\StudentAdminGuard` redirects front-end-only users away from `wp-admin` and hides the admin toolbar for them. Access is decided by capability — administrators, studio admins, and instructors keep full `wp-admin`; anyone with only student capabilities is bounced. AJAX passes through. (The optional `wp-login.php` redirect was intentionally left out.)
### 3. Empty instructor picker for a solo studio owner
`OfferingController::instructorOptions()` queried only the `us_instructor` role, so a studio owner who teaches from a WordPress administrator account (the default single-account setup) never appeared. It now also queries `administrator` when `adminsAreInstructors()` is enabled, and excludes admins when that toggle is off.
### Tests
- New: `QuestionEndpointTest`, `PolicyEndpointTest`, `StudentAdminGuardTest`; additions to `OfferingEndpointTest` and `OfferingControllerTest`.
- `composer test` (618 tests), `composer lint` (PHPStan L10), `composer cs` all pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Three bug fixes for the 1.2.1 section:
- Fixed-size fields (question labels, offering titles/notes/e-transfer
email, policy titles/slugs) no longer silently fail to save when the
value exceeds its column length. The REST endpoints reject over-long
values with a 400, the admin controllers refuse to insert them, and the
form inputs carry a maxlength so the browser blocks over-long entry.
Limits are MAX_* constants on the value objects, kept in lockstep with
the schema columns.
- Students are kept out of wp-admin entirely. New StudentAdminGuard
redirects front-end-only users (no back-office capability) away from the
dashboard and hides the admin bar for them, while administrators, studio
admins, and instructors keep full access.
- The Add/Edit Offering instructor picker now includes WordPress
administrators when they act as instructors (the default single-account
setup), so a solo studio owner is selectable instead of the dropdown
being empty.
composer test (618), composer lint, composer cs all pass.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Three bug fixes recorded under the 1.2.1 changelog section (no schema change, so no version bump).
1. Over-length fixed-size fields silently discarded
Typing a value past a fixed-size column's limit reported success but saved nothing — the DB quietly rejected the over-long row while the code returned 200/201. Added length guards for every free-text fixed-size field (enum columns are already whitelist-guarded):
label(VARCHAR 255), Offeringstitle/schedule_note/etransfer_email(191), Policiestitle/slug(191).maxlength.MAX_*constants on the value objects, kept in lockstep with the schema.2. Students reaching the WordPress dashboard
New
Auth\StudentAdminGuardredirects front-end-only users away fromwp-adminand hides the admin toolbar for them. Access is decided by capability — administrators, studio admins, and instructors keep fullwp-admin; anyone with only student capabilities is bounced. AJAX passes through. (The optionalwp-login.phpredirect was intentionally left out.)3. Empty instructor picker for a solo studio owner
OfferingController::instructorOptions()queried only theus_instructorrole, so a studio owner who teaches from a WordPress administrator account (the default single-account setup) never appeared. It now also queriesadministratorwhenadminsAreInstructors()is enabled, and excludes admins when that toggle is off.Tests
QuestionEndpointTest,PolicyEndpointTest,StudentAdminGuardTest; additions toOfferingEndpointTestandOfferingControllerTest.composer test(618 tests),composer lint(PHPStan L10),composer csall pass.🤖 Generated with Claude Code