Skip to content

fix: admin page minor bugs - #205

Open
Kallyan01 wants to merge 3 commits into
mainfrom
fix/minor-bugs
Open

Kallyan01 wants to merge 3 commits into
mainfrom
fix/minor-bugs

Conversation

@Kallyan01

@Kallyan01 Kallyan01 commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Three small admin fixes:

  • Site checkboxes are clickable again.
  • No more duplicate menu items. "Settings" appeared twice and its page mounted two roots.
  • REST permissions now match the menu. OneAccess endpoints require oneaccess_manage_settings (Network Admin / Brand Admin) instead of manage_options. POST /site-type still accepts manage_options while the site type is unset, so onboarding keeps working.

Testing

On a local governing site and brand site:

  • The site checkboxes toggle with a real click in both modals.
  • Each menu item appears once: governing shows Manage Users and Settings, brand shows Settings. A governing site with no brand sites shows only Settings. The onboarding modal still loads when the site type is unset.
  • REST: an admin with the OneAccess role gets 200; a plain administrator gets 403 (on main they got 200, including /secret-key). A plain admin can still complete onboarding.

Notes

Checklist

  • I have read the Contribution Guidelines.
  • I have read the Development Guidelines.
  • I have added necessary tests to cover my changes.
  • I have updated the project documentation as needed.
  • My code has detailed inline documentation.
  • My code is tested to the best of my abilities.
  • My code passes all lints, tests, and checks.
Open WordPress Playground Preview

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 6.93%. Comparing base (3ac4aa6) to head (b690624).

Files with missing lines Patch % Lines
inc/Modules/Rest/Basic_Options_Controller.php 0.00% 5 Missing ⚠️
inc/Modules/Settings/Admin.php 0.00% 3 Missing ⚠️
inc/Modules/Rest/Abstract_REST_Controller.php 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              main    #205      +/-   ##
==========================================
+ Coverage     6.81%   6.93%   +0.11%     
+ Complexity     601     589      -12     
==========================================
  Files           20      20              
  Lines         3036    2987      -49     
==========================================
  Hits           207     207              
+ Misses        2829    2780      -49     
Flag Coverage Δ
unit 6.93% <0.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
inc/Modules/User/Admin.php 0.00% <ø> (ø)
inc/Modules/Rest/Abstract_REST_Controller.php 0.00% <0.00%> (ø)
inc/Modules/Settings/Admin.php 0.00% <0.00%> (ø)
inc/Modules/Rest/Basic_Options_Controller.php 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Kallyan01
Kallyan01 requested a review from justlevine October 14, 2026 06:41
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.

2 participants