cartodb-4.42/lib/carto/tracking/validators/layer.rb
2024-04-06 05:25:13 +00:00

15 lines
358 B
Ruby

module Carto
module Tracking
module Validators
module Layer
def check_layer_belongs_to_visualization!
layer = @format.fetch_record!(:layer)
unless layer && layer.visualization == @format.fetch_record!(:visualization)
raise Carto::UnauthorizedError.new
end
end
end
end
end
end