mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-27 10:01:56 +08:00
Test: share/storage/user model
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user