Skip to content

Add admin backend for users and featured plugins - #181

Merged
josbeir merged 6 commits into
masterfrom
feature/admin-backend
Nov 13, 2026
Merged

josbeir merged 6 commits into
masterfrom
feature/admin-backend

Conversation

@josbeir

@josbeir josbeir commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Adds an admin backend in a local CakePHP Admin plugin, using DaisyUI components, the existing themes and GitHub login, and Interact's standard update endpoint. Administrators can search users, assign admin/user roles, and suspend or reactivate accounts. CakePHP ORM enums define roles and shared status choices; current access is checked on every admin island request, with safeguards for self-access and the last active administrator. Native request authorization protects admin pages, and PrimaryKeySession reloads active users on every request. Sidebar links use Interact navigation across admin and public pages.

Featured selections move from application configuration into the database, preserving the existing selection and random display of up to three cards. The listing handles filters, sorting, pagination, and removal. A separate keyed editor island owns the package picker, whole-form draft, live preview, and saving; save events refresh the listing while preserving its filters and sort. FormHelper supplies DaisyUI controls and entity validation errors. Shared models own query finders, normalization, and package selection rules. All data columns are sortable, including GitHub stars and downloads.

Validation

  • PHPUnit: 115 tests, 496 assertions; four pre-existing incomplete tests, no failures or reported deprecations.
  • Full browser suite: all 35 tests pass, including nine admin tests covering access, editor isolation, cancellation, saving, sorting, themes, and Interact sidebar navigation without JavaScript errors.
  • Frontend build, PHPStan, Rector, and PHPCS pass; PHPCS checks all 136 files without errors or warnings.

Rollout

Apply the application migrations. Existing accounts default to active users. Existing sessions require signing in again because login now stores only the user ID in AuthId instead of a full cached identity. After signing in with GitHub, promote the initial administrator with:

bin/cake users <github-username> --role admin --active yes

The README documents the admin workflow and console access management.

@josbeir
josbeir merged commit 86551ff into master Nov 13, 2026
3 checks passed
@josbeir
josbeir deleted the feature/admin-backend branch November 13, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant