fix(management): exclude disabled runtime-only auths from file entries

This commit is contained in:
hkfires
2025-11-10 08:32:32 +08:00
parent ef7e8206d3
commit 43095de162

View File

@@ -293,6 +293,9 @@ func (h *Handler) buildAuthFileEntry(auth *coreauth.Auth) gin.H {
return nil
}
runtimeOnly := isRuntimeOnlyAuth(auth)
if runtimeOnly && (auth.Disabled || auth.Status == coreauth.StatusDisabled) {
return nil
}
path := strings.TrimSpace(authAttribute(auth, "path"))
if path == "" && !runtimeOnly {
return nil