2026-05-19 11:00:28 +00:00
|
|
|
// Code scaffolded by goctl. Safe to edit.
|
|
|
|
|
// goctl 1.10.1
|
|
|
|
|
|
|
|
|
|
package config
|
|
|
|
|
|
2026-05-20 07:01:08 +00:00
|
|
|
import (
|
|
|
|
|
"github.com/zeromicro/go-zero/core/stores/redis"
|
|
|
|
|
"github.com/zeromicro/go-zero/rest"
|
|
|
|
|
|
|
|
|
|
"gateway/internal/library/mongo"
|
2026-05-21 06:45:35 +00:00
|
|
|
"gateway/internal/library/zitadel"
|
|
|
|
|
authconfig "gateway/internal/model/auth/config"
|
2026-05-20 07:01:08 +00:00
|
|
|
memberconfig "gateway/internal/model/member/config"
|
|
|
|
|
notifconfig "gateway/internal/model/notification/config"
|
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 08:47:35 +00:00
|
|
|
permconfig "gateway/internal/model/permission/config"
|
2026-05-20 07:01:08 +00:00
|
|
|
)
|
2026-05-19 11:00:28 +00:00
|
|
|
|
|
|
|
|
type Config struct {
|
|
|
|
|
rest.RestConf
|
2026-05-20 13:03:59 +00:00
|
|
|
Mongo mongo.Conf `json:",optional"`
|
|
|
|
|
Redis redis.RedisConf `json:",optional"`
|
2026-05-21 06:45:35 +00:00
|
|
|
Auth authconfig.Config `json:",optional"`
|
|
|
|
|
Zitadel zitadel.Conf `json:",optional"`
|
2026-05-20 13:03:59 +00:00
|
|
|
Notification notifconfig.Config `json:",optional"`
|
|
|
|
|
Member memberconfig.Config `json:",optional"`
|
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 08:47:35 +00:00
|
|
|
Permission permconfig.Config `json:",optional"`
|
2026-05-19 11:00:28 +00:00
|
|
|
}
|