mirror of
				https://github.com/cloudreve/cloudreve.git
				synced 2025-10-31 08:39:10 +08:00 
			
		
		
		
	Feat: user storage pack
This commit is contained in:
		| @ -105,10 +105,11 @@ func (user *User) IncreaseStorageWithoutCheck(size uint64) { | ||||
|  | ||||
| // GetRemainingCapacity 获取剩余配额 | ||||
| func (user *User) GetRemainingCapacity() uint64 { | ||||
| 	if user.Group.MaxStorage <= user.Storage { | ||||
| 	total := user.Group.MaxStorage + user.GetAvailablePackSize() | ||||
| 	if total <= user.Storage { | ||||
| 		return 0 | ||||
| 	} | ||||
| 	return user.Group.MaxStorage - user.Storage | ||||
| 	return total - user.Storage | ||||
| } | ||||
|  | ||||
| // GetPolicyID 获取用户当前的存储策略ID | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 HFO4
					HFO4