mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Modify: close file in main routine
This commit is contained in:
@@ -35,9 +35,11 @@ type policy struct {
|
||||
}
|
||||
|
||||
type group struct {
|
||||
AllowShare bool `json:"allowShare"`
|
||||
AllowRemoteDownload bool `json:"allowRemoteDownload"`
|
||||
AllowTorrentDownload bool `json:"allowTorrentDownload"`
|
||||
ID uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
AllowShare bool `json:"allowShare"`
|
||||
AllowRemoteDownload bool `json:"allowRemoteDownload"`
|
||||
AllowTorrentDownload bool `json:"allowTorrentDownload"`
|
||||
}
|
||||
|
||||
type storage struct {
|
||||
@@ -65,6 +67,8 @@ func BuildUser(user model.User) User {
|
||||
AllowGetSource: user.Policy.IsOriginLinkEnable,
|
||||
},
|
||||
Group: group{
|
||||
ID: user.GroupID,
|
||||
Name: user.Group.Name,
|
||||
AllowShare: user.Group.ShareEnabled,
|
||||
AllowRemoteDownload: aria2Option[0],
|
||||
AllowTorrentDownload: aria2Option[2],
|
||||
|
||||
Reference in New Issue
Block a user