cartodb-4.42/lib/carto/tracking/validators/layer.rb

15 lines
358 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
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