Test: share/storage/user model

This commit is contained in:
HFO4
2020-02-17 14:04:48 +08:00
parent 0253b4e5b6
commit 0502a0f212
6 changed files with 246 additions and 5 deletions

View File

@@ -67,6 +67,11 @@ func (share *Share) IsAvailable() bool {
return false
}
// 检查创建者状态
if share.Creator().Status != Active {
return false
}
// 检查源对象是否存在
var sourceID uint
if share.IsDir {
@@ -81,11 +86,6 @@ func (share *Share) IsAvailable() bool {
return false
}
// 检查创建者状态
if share.Creator().Status != Active {
return false
}
return true
}