Skip to content

chore: remove store awareness from usermanager - #96

Merged
tyrsson merged 2 commits into
1.0.xfrom
chore/remove-store-awareness
Oct 11, 2026
Merged

tyrsson merged 2 commits into
1.0.xfrom
chore/remove-store-awareness

Conversation

@tyrsson

@tyrsson tyrsson commented Oct 11, 2026

Copy link
Copy Markdown
Member

Why

Store and ownership are store-package and ACL concerns. This component should hold no store-scoped concepts, and issue #37's acceptance bar is "webware-usermanager has zero references to storeId (grep confirms)".

What changed

File Change
src/Console/Schema/UserSchema.php details column comment: "Plugin extension data - storeId, etc. as JSON" -> "Plugin extension data as JSON"
src/Entity/User.php getOwnerId() and getResourceId() docblocks describe the ACL contract and its consumers without naming a store
src/Repository/UserRepositoryInterface.php findAll() no longer documents a store filter; the narrowing arguments it already accepts are the caller's
test/unit/Console/Schema/UserSchemaTest.php asserts the new comment
test/unit/Entity/UserTest.php details assertions use generic keys instead of storeId
test/unit/Repository/UserRepositoryTest.php the join case uses a neutral profile table instead of the store join
docs/user-interface.md requirement 5 and two checklist rows lose the store-scoped wording
plan/plan-admin-create-user.md, docs/plan-admin-create-user.md out-of-scope line drops the storeId migration
plan/plan-admin-edit-user.md update-path field list, step 8 and the excluded-scope line drop storeId
plan/roleid-audit-results.md the store User section is reduced to a roleId-inheritance statement
plan/plan-storeid-migration.md deleted

Why the plan document is deleted

Its Phase 2 code purge is already complete in src/ and test/, and phases 1, 3 and 4 are store-package work: the column migration, the params rendering, and the store registration flow. Every naming reference it carries (SaveUserCommand, SaveUserHandler) points at classes this component no longer has.

Why the details JSON column stays

details is not store data. It is the unmapped-row extension point in the Webware\Core\UserInterface contract, and the store package already reads and writes it through getDetail() and withDetail(). Removing the column would remove a contract surface, not store awareness.

Verification

  • grep -i storeid over the tracked tree: 0 matches
  • phpunit --testsuite "unit test": OK (432 tests, 1320 assertions)
  • mago fmt --check: all files already formatted
  • mago lint: no issues
  • mago analyze: no issues
  • mago guard: no issues

Closes #37

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

tyrsson and others added 2 commits October 11, 2026 11:41
Store and ownership belong to the store package and to ACL, not to this
component. Replaces every storeId reference with a neutral one, so the
component holds no store-scoped concepts of its own.

- UserSchema: the details column comment becomes "Plugin extension data as
  JSON"; the column is unmapped by this component either way.
- Entity/User: getOwnerId() and getResourceId() docblocks describe the ACL
  contract and its consumers without naming a store.
- UserRepositoryInterface::findAll() no longer documents a store filter; the
  narrowing arguments it already accepts are the caller's.
- Tests: no fixture is store-shaped. The repository join case uses a neutral
  profile table, and the details assertions use generic keys.
- Docs and plans lose the storeId rows.
- plan/plan-storeid-migration.md is deleted. Its code purge is already complete
  in src/ and test/, and the remaining phases are store-package work.

The details JSON column stays: it is the extension point the contract documents,
not store data.

Closes #37

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tyrsson
tyrsson merged commit e103c9f into 1.0.x Oct 11, 2026
12 checks passed
@tyrsson
tyrsson deleted the chore/remove-store-awareness branch October 11, 2026 17:04
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.

Remove store awareness from usermanager; route authorization through ACL

1 participant