40 Commits (master)

Author SHA1 Message Date
veypi a7ffd15601 refactor: Remove multi-tenant org system and simplify auth
- Delete org API endpoints (add_member, create, del, get, list, member, patch, tree)
    - Delete models/org.go and remove Org/OrgMember models
    - Delete org-related test files (org_crud, org_load_middleware, org_permission, multi_tenant)
    - Delete org test scripts (03_org_permission.sh, 04_org_load_middleware.sh)
    - Simplify auth/auth.go by removing org context and role loading logic
    - Remove org claims from JWT tokens and login/register responses
    - Redesign Permission model with hierarchical level-based access control
    - Add auth/design.md with new permission system specification
    - Update user and role APIs to work without org context
5 days ago
veypi ec47bcc192 refactor: Migrate auth to Vigo auth interface and simplify initialization
- Replace GetUserID/GetOrgID with VBaseAuth.UserID/OrgID methods across all APIs
- Integrate vigoauth.Auth interface into appAuth for standard auth methods
- Move AuthMiddleware to PermLogin method in auth package
- Add role management methods: GetRole, ListRoles, GrantRoles, RevokeRoles, ListUserRoles
- Update ListUserPermissions and ListResourceUsers to return vigoauth types
- Export Redis client in cfg package
- Simplify app initialization by separating vigo.New in cli/main.go
- Remove deprecated auth/middleware.go file
5 days ago
veypi b0322047cd feat: Restrict user APIs to admins and add public user search
- Add /api/auth/users endpoint for authenticated users to search other users
    - Only return public info (id, username, nickname, avatar) in search results
    - Change /api/user routes to require user:admin permission instead of user:read
    - Update auth tests to use /api/auth/me for self updates
    - Add tests for new user search endpoint
1 week ago
veypi f7c4f1ee86 test: improve test stability and documentation
- Add 'clean_run.sh' script to reset database and restart server for clean test environment
    - Update 'README.md' with detailed troubleshooting guide and pitfalls
    - Add '04_org_load_middleware.sh' to test LoadOrg middleware functionality
    - Update 'run_all.sh' to include new middleware test
    - Fix BASE_URL handling in 'lib.sh' and test scripts to support custom environments
    - Update '02_resource_perm.sh' to fix admin permission checks
    - Remove debug logging from 'auth.go'
1 week ago
veypi 23c7f6cb7a refactor(auth): 重构认证系统,支持多种验证方式和 OAuth 提供商管理
- 新增验证模块(api/verification),统一处理短信和邮件验证码发送
    - 新增邮件发送功能(libs/email),支持 SMTP 协议
    - 重构短信模块(libs/sms),简化阿里云和腾讯云短信接口
    - 新增 OAuth 提供商管理 API(api/oauth/providers),支持 CRUD 操作
    - 新增系统设置管理 API(api/settings),支持动态配置更新
    - 重构认证方式管理(api/auth/methods),支持启用/禁用多种登录方式
    - 删除旧的 sms_providers 和 sms API 模块,迁移至新验证体系
    - 新增数据库模型:verification、email、oauth_provider、oauth_templates、setting
    - 更新配置文档,增加新功能的使用说明
1 week ago
veypi 691f1df75b feat: 添加角色管理模块(API + UI) 1 week ago
veypi 8b2a1aba3b refactor: 统一API错误类型处理 1 week ago
veypi 5daab97008 fix bug 1 week ago
veypi 26bd0bfd29 update 1 week ago
veypi 8fa01c4c52 upgrade 1 week ago
veypi 52f2ae35ab upgrade new version 1 week ago
veypi 45708ca4f0 remove old 1 week ago
veypi a3923ebcdb update 2 weeks ago
veypi 89e7caa7b0 uodate login api 3 weeks ago
veypi 6d0ec8e6ba rename to vbase 3 weeks ago
veypi a74ccb104f update to new vigo version 3 weeks ago
veypi 1880a6ce0f update router params 3 weeks ago
veypi 67b92662d1 add sms enable option 2 months ago
veypi 95eccc2cde update 6 months ago
veypi 69b4b7c504 change vyes-ai 7 months ago
veypi 134ab38751 fix: fix login bug 7 months ago
veypi ada216cfd5 feat: change auth check 7 months ago
veypi 1a29442c1c im dead 7 months ago
veypi e83f2da265 update crud and env.js 7 months ago
veypi 959e390126 feat: change to vigo 7 months ago
veypi 3b9cbe1c1b feat: change axios and add auth refresh 8 months ago
veypi d472464d8a update 10 months ago
veypi 7e7e6ed506 feat: simplify user login 10 months ago
veypi 5112f1ab7d change to new version 10 months ago
veypi 17f81f6a2a del old file 2 years ago
veypi f9065abe55 update 4 years ago
veypi 27d5008919 file component 4 years ago
veypi e081e4ecb6 用户权限编辑 登录跳转 4 years ago
veypi 4afa6f345e 命名规则统一改为驼峰式 4 years ago
veypi aae799c7fa change name of pack, add oalib 4 years ago
veypi bcbfc0380a add user role auth page 4 years ago
veypi bc3f5e0b0c home 4 years ago
veypi 82b64a4bb2 用户加密机制设计初步完成 4 years ago
veypi cd7029c298 更新权限和用户模型 4 years ago
veypi 3d194e935d update 4 years ago