render :nothing => true, :status => :method_not_allowed
return
end
+
changeset = Changeset.find(params[:id])
+
+ unless @user.id == changeset.user_id
+ raise OSM::APIUserChangesetMismatchError
+ end
+
changeset.open = false
changeset.save!
render :nothing => true
if request.post?
cs = Changeset.find(params[:id])
+ # check user credentials - only the user who opened a changeset
+ # may alter it.
+ unless @user.id == changeset.user_id
+ raise OSM::APIUserChangesetMismatchError
+ end
+
# keep an array of lons and lats
lon = Array.new
lat = Array.new
return
end
+ # access control - only the user who created a changeset may
+ # upload to it.
+ unless @user.id == changeset.user_id
+ raise OSM::APIUserChangesetMismatchError
+ end
+
changeset = Changeset.find(params[:id])
diff_reader = DiffReader.new(request.raw_post, changeset)