fix: making sure all users can access all functions of all instances

This commit is contained in:
NanamiAdmin committed 2026-05-08 14:16:20 +08:00
1 parent a78e715293
commit 898b67a24b
3 files changed
+36 -32

No files matched your search

+5 -5
View File
@@ -59,16 +59,16 @@ func (h *LogSocketHandler) Handle(w http.ResponseWriter, r *http.Request) {
return
}
instance, err := DBQueryFrpcInstanceByID(instanceID)
_, err = DBQueryFrpcInstanceByID(instanceID)
if err != nil {
SendHTTPError(w, http.StatusNotFound, "Instance not found")
return
}
if instance.UserID != userID {
SendHTTPError(w, http.StatusForbidden, "You don't have access to this instance")
return
}
// if instance.UserID != userID {
// SendHTTPError(w, http.StatusForbidden, "You don't have access to this instance")
// return
// }
serviceName, err := GetServiceNameByInstanceID(instanceID)
if err != nil {