Commit Graph

3 Commits

Author SHA1 Message Date
loveuer
5f187bb5d6 feat: add user management system with roles and permissions
Some checks failed
/ build ushare (push) Failing after 1m40s
/ clean (push) Successful in 2s
- Introduce SQLite persistence via GORM (stored at <data>/.ushare.db)
- Add Role model with two built-in roles: admin (all perms) and user (upload only)
- Add three permissions: user_manage, upload, token_manage (reserved)
- Rewrite UserManager: DB-backed login with in-memory session tokens
- Auto-seed default roles and admin user on first startup
- Add AuthPermission middleware for fine-grained permission checks
- Add /api/uauth/me endpoint for current session info
- Add /api/admin/* CRUD routes for user and role management
- Add admin console page (/admin) with user table and role permissions view
- Show admin console link in share page for users with user_manage permission

🤖 Generated with [Qoder][https://qoder.com]
2026-02-27 19:40:31 -08:00
loveuer
56874b754e feat: implement single binary build and env-based auth
Some checks failed
/ build ushare (push) Has been cancelled
/ clean (push) Has been cancelled
- Unify login page styling with share page
- Add AGENTS.md with build commands and code style guidelines
- Add dev.sh and make.sh for development and production builds
- Implement single binary build with embedded frontend using embed.FS
- Change auth configuration from CLI flag to env variables (USHARE_USERNAME, USHARE_PASSWORD)
- Set default credentials: admin / ushare@123
- Fix static file serving for SPA routes
2026-01-17 23:28:21 +08:00
loveuer
b1b3ac5b6b feat: 0.1.2
1. login page && auth required
  2. file dir cleanup
2025-05-12 15:54:52 +08:00