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

This commit is contained in:
2026-05-08 14:16:20 +08:00
parent a78e715293
commit 898b67a24b
3 changed files with 36 additions and 32 deletions
+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 {