31 Commits (c84859a034a061f30134cbe4c1473ab18346dded)

Author SHA1 Message Date
veypi c84859a034 feat(cfg): Add user creation hook
- Add `OnUserCreate` hook variable in `cfg/cfg.go` for custom callbacks
    - Invoke `OnUserCreate` after successful user registration in `api/auth/register.go`
    - Log warning when user creation hook fails
15 hours ago
veypi 529ac0d084 chore(cfg): Change default database to SQLite
- Switch default DB type from mysql to sqlite
    - Update default DSN to local SQLite file path /tmp/vbase.db
1 day ago
veypi bd5604a425 chore: bump version to v1.1.1 1 week ago
veypi 3ea5499532 refactor(auth): Migrate to new vigo auth.Auth and Provider pattern
- Rename appAuth to vbaseProvider implementing auth.Provider interface
    - Replace auth.VBaseAuth with cfg.Auth (auth.Auth struct) for middleware
    - Add global cfg.Auth instance with SetProvider injection in init.go
    - Update all API handlers to use cfg.Auth.RequireXxx instead of PermXxx
    - Update tests to use cfg.Auth for permission checks
    - Remove Login/Perm methods from Provider (now in auth.Auth struct)
2 months ago
veypi da20940c13 feat(ui): Add role detail modal with permission and user management
- Add role detail dialog with tabs for permissions and users
    - Implement permission selector with level badges (create/read/write/admin)
    - Add user management with avatar display and search functionality
    - Add i18n translations for new role management features
    - Update default DB charset from utf8 to utf8mb4
2 months ago
veypi e83444df4c refactor(models): Remove TableName methods and use global table prefix
- Add DB.Prefix "vb_" to cfg.DB config for global table prefix
    - Remove TableName() methods from all models (User, Role, Permission, etc.)
    - Remove Role.Scope field and its unique index with Code
    - Let GORM auto-generate table names with configured prefix
2 months 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
2 months ago
veypi df0f7f047a refactor: Rename Config to Global and simplify app initialization
- Rename cfg.Config to cfg.Global for consistency
    - Simplify cli/main.go to use vbase.App.Run() pattern
    - Update init.go to create app with vigo.New and Init function
    - Update all references from cfg.Config to cfg.Global across api, libs, models, and tests
    - Fix VBase constructor parameter order in ui/vbase.js
    - Update ui/env.js to use new VBase('vb', '/') initialization
2 months ago
veypi 95cdcd557c fix(auth): Correct owner ID resolution order in PermWithOwner
- Fix owner ID lookup to prioritize PathParams and Query over Context
    - Prevent incorrect owner match when context contains current user ID
    - Reset InitAdmin.Password to empty so first registered user becomes admin
2 months ago
veypi 4a57017067 refactor(cfg): Restructure database configuration and initialization flow
- Replace separate DB/DSN fields with unified config.Database struct
    - Remove cfg/db.go and move DB client to config.Database.Client()
    - Update auth to use event-driven initialization via vb.init.auth event
    - Refactor models initialization to use event system (vb.init.settings/oauth/admin)
    - Update CLI to use event.Start() instead of manual InitDB() call
    - Fix auth_test.go to use new DB config structure
    - Update agents.md documentation with new CLI flags format
2 months 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
    - 更新配置文档,增加新功能的使用说明
2 months ago
veypi f42d36f71f add docs and auth test 3 months ago
veypi 52f2ae35ab upgrade new version 3 months ago
veypi 45708ca4f0 remove old 3 months ago
veypi 95eccc2cde update 8 months ago
veypi cbf9f7a6e6 update login v:bind 9 months ago
veypi ada216cfd5 feat: change auth check 9 months ago
veypi ae463e0723 update 9 months ago
veypi 959e390126 feat: change to vigo 10 months ago
veypi 3b9cbe1c1b feat: change axios and add auth refresh 10 months ago
veypi d472464d8a update 12 months ago
veypi 5112f1ab7d change to new version 12 months ago
veypi 17f81f6a2a del old file 3 years ago
veypi f9065abe55 update 4 years ago
veypi 5e341aeef5 对接oa 去掉用户 4 years ago
veypi 27d5008919 file component 4 years ago
veypi 4afa6f345e 命名规则统一改为驼峰式 5 years ago
veypi bc3f5e0b0c home 5 years ago
veypi 82b64a4bb2 用户加密机制设计初步完成 5 years ago
veypi cd7029c298 更新权限和用户模型 5 years ago
veypi 3d194e935d update 5 years ago