24 Commits (v4)

Author SHA1 Message Date
veypi 92156dcd53 feat(auth): Improve permission system and role management
- Add Scope and Level fields to UserPermissionInfo response
    - Include role-based permissions in /auth/me endpoint
    - Implement diff-based permission sync for role initialization
    - Remove Scope field from Role model queries (create, patch, grant)
    - Add permission-based route guards in UI (perm: '*')
    - Fix register to return error on default role assignment failure
    - Fix token refresh to only fetch user when token exists
    - Fix code formatting in api/init.go (remove extra spaces)
3 weeks ago
veypi 0e8e72b7e7 refactor(api): Improve API parameter handling and add public info endpoint
- Change BindMode from bool to *bool in thirdparty auth for proper optional handling
    - Change Error field from string to *string in OAuth callback request
    - Change Email and Phone to *string pointers in bind with register request
    - Add public /api/info endpoint for frontend configuration
    - Update OAuth token request to use pointers for optional code and refresh_token
    - Add desc tags to various request struct fields for API documentation
    - Fix path parameter binding with explicit @code suffix for OAuth providers
    - Change Description field to *string pointer in role creation
    - Change Category field to *string pointer in settings list
3 weeks ago
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
4 weeks 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
4 weeks 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 month ago
veypi 691f1df75b feat: 添加角色管理模块(API + UI) 1 month ago
veypi 26bd0bfd29 update 1 month ago
veypi 8fa01c4c52 upgrade 1 month ago
veypi ced7cc6a07 update perm 1 month ago
veypi 52f2ae35ab upgrade new version 1 month ago
veypi 45708ca4f0 remove old 1 month ago
veypi 6d0ec8e6ba rename to vbase 1 month ago
veypi a74ccb104f update to new vigo version 2 months ago
veypi 1880a6ce0f update router params 2 months ago
veypi 67b92662d1 add sms enable option 3 months ago
veypi 95eccc2cde update 7 months ago
veypi 69b4b7c504 change vyes-ai 8 months ago
veypi ada216cfd5 feat: change auth check 8 months ago
veypi e83f2da265 update crud and env.js 8 months ago
veypi a5339aa589 feat: oauth demo 8 months ago
veypi 959e390126 feat: change to vigo 8 months ago
veypi d472464d8a update 10 months ago
veypi 71924315b4 update access 10 months ago
veypi 5112f1ab7d change to new version 11 months ago