fix: making sure all users can access all functions of all instances
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user