mirror of https://github.com/Xhofe/alist
- Add new imports: `database/sql`, `encoding/json`, and `conf` package in `convert_role.go`. - Simplify permission entry initialization by removing redundant struct formatting. - Update error logging messages for better clarity. - Replace `op.GetUsers` with direct database access for fetching user roles. - Implement role update logic using `rawDb` and handle legacy int role conversion. - Count the number of users whose roles are updated and log completion. - Introduce `IsLegacyRoleDetected` function to check for legacy role formats. - Modify `cmd/common.go` to invoke role conversion if legacy format is detected. |
||
|---|---|---|
| .. | ||
| flags | ||
| admin.go | ||
| cancel2FA.go | ||
| common.go | ||
| kill.go | ||
| lang.go | ||
| restart.go | ||
| root.go | ||
| server.go | ||
| start.go | ||
| stop_default.go | ||
| stop_windows.go | ||
| storage.go | ||
| user.go | ||
| version.go | ||