4 Commits (v4)

Author SHA1 Message Date
veypi 438a84d9fc docs: Update documentation to reflect scoped RBAC and remove org system
- Update CLAUDE.md to describe scoped RBAC instead of multi-tenant org
    - Simplify README.md removing org-related features
    - Update auth.md with comprehensive scoped permission documentation
    - Remove configuration.md (merged into other docs)
    - Update design.md with new architecture decisions
    - Update integration.md with scoped auth examples
    - Update UI documentation removing org references
    - Update test README removing org test references
3 weeks ago
veypi 33eabfa013 refactor(auth): 重构权限系统,简化API并添加缓存支持
主要变更:
- 将权限域从 appKey 改为 scope,权限ID格式为 scope:resource:action
- 新增 AddRole(roleCode, roleName, policies...) 方法,支持动态添加角色
- 简化 Factory.New() 只保留 scope 参数,移除 models.AppConfig 依赖
- PermAny/PermAll 改为变长参数 ...string 形式,使用更简洁
- AuthMiddleware 添加 Redis 缓存组织成员身份和角色信息(5分钟过期)
- 移除 models.AppConfig 和 models.RoleDefinition 结构体
- 更新测试和文档

BREAKING CHANGE: Factory.New() 签名变更,需要使用新的 AddRole API
1 month ago
veypi 5daab97008 fix bug 1 month ago
veypi 26bd0bfd29 update 1 month ago