文件管理权限控制

This commit is contained in:
ryan
2026-06-11 14:17:36 +08:00
parent 5e0de01c4b
commit eb9f6023f0
2 changed files with 11 additions and 41 deletions
+3 -17
View File
@@ -190,22 +190,8 @@ func TestGetDistinctUploadTypes(t *testing.T) {
t.Fatalf("unexpected error: %s", resp.ErrorMsg)
}
// Verify that custom_type_xyz and default types are present
hasCustom := false
hasAvatar := false
for _, typeName := range resp.Data {
if typeName == "custom_type_xyz" {
hasCustom = true
}
if typeName == "avatar" {
hasAvatar = true
}
}
if !hasCustom {
t.Errorf("expected custom_type_xyz to be in types, got: %v", resp.Data)
}
if !hasAvatar {
t.Errorf("expected avatar to be in types, got: %v", resp.Data)
// Verify that only custom_type_xyz is present
if len(resp.Data) != 1 || resp.Data[0] != "custom_type_xyz" {
t.Errorf("expected only custom_type_xyz in types list, got: %v", resp.Data)
}
}