summaryrefslogtreecommitdiff
path: root/lib/api/access_requests.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2017-03-01 14:35:48 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2017-08-28 16:40:25 +0200
commit998afa5f74558be215a924d95aa131a69831ca43 (patch)
tree500c242e2bacd966b3faf1a019f28edff2ee24d7 /lib/api/access_requests.rb
parent7ccef75a26bc4997e04c109007e6c6ee004574cb (diff)
downloadgitlab-ce-998afa5f74558be215a924d95aa131a69831ca43.tar.gz
API: Respect the 'If-Unmodified-Since' for delete endpoints
Diffstat (limited to 'lib/api/access_requests.rb')
-rw-r--r--lib/api/access_requests.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/access_requests.rb b/lib/api/access_requests.rb
index cdacf9839e5..0c5b8862d79 100644
--- a/lib/api/access_requests.rb
+++ b/lib/api/access_requests.rb
@@ -67,6 +67,9 @@ module API
end
delete ":id/access_requests/:user_id" do
source = find_source(source_type, params[:id])
+ member = source.public_send(:requesters).find_by!(user_id: params[:user_id])
+
+ check_unmodified_since(member.updated_at)
status 204
::Members::DestroyService.new(source, current_user, params)