王性驊
|
fa50c64ee4
|
feat(permission): add RBAC module with Casbin enforcement and policy reload
- Multi-tenant RBAC: permission catalog, roles, role-permission mapping,
user-role assignment, and external IdP role mapping (zitadel/ldap/scim).
- Casbin enforcer with Redis-backed adapter and Pub/Sub reload for
multi-instance policy sync; HTTP middleware enforces (tenant, role,
path, method) with platform admin bypass.
- /api/v1/permissions routes: catalog, me, policy/reload, roles CRUD,
role permissions, user roles, role mappings.
- New error scope (31) for Permission and biz code descriptions.
- Wire Permission module into ServiceContext, config, mongo-index, and
add cmd/permission-seed CLI plus etc/rbac.conf model.
- Redis client gains lazy PubSubClient helper (go-zero wrapper lacks Subscribe).
- Rewrite internal/model/member/README to cover Tenant/Member/Identity.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-05-21 16:47:35 +08:00 |
王性驊
|
713a81f70b
|
feat(auth): add unified registration/login module with Zitadel + lint cleanup
- Introduce auth module: handlers, logic, domain/repository/usecase, JWT
middleware, and Zitadel OIDC client (password + authorization code +
userinfo + JWKS verification)
- Wire member rate-limit, structured errors, and refactored member/
notification usecases (introduce shared errors, drop repo_errors.go)
- Bring the codebase to zero golangci-lint issues:
* goimports formatting
* errcheck on io.ReadAll/Unlock cleanup paths
* contextcheck: HandlerContext now takes (ctx, *http.Request)
* gocritic: rename shadowed `max`, use http.NoBody
* goconst: extract test fixtures and bsonOpSet
* testifylint: switch to assert inside httptest handlers
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-05-21 14:45:35 +08:00 |
王性驊
|
49e7099bf2
|
add notification and member modules with local dev stack
Implement outbound notification (sync/async, idempotency, quota, DLQ),
member OTP/verification, SMTP/SES/Mitake providers, shared Redis wiring,
docker-compose for Mongo/Redis, and gateway config documentation.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-05-20 15:01:08 +08:00 |