Merge branch '8784-dir-listings'
[arvados.git] / apps / workbench / app / controllers / user_agreements_controller.rb
index f8c316e58c7606c086a6e91132f14c381e02f1e8..2797c4c682fae377d92891a5072bea656148a900 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 class UserAgreementsController < ApplicationController
   skip_before_filter :check_user_agreements
   skip_before_filter :find_object_by_uuid
@@ -15,7 +19,7 @@ class UserAgreementsController < ApplicationController
 
   def sign
     params[:checked].each do |checked|
-      if r = checked.match(/^([0-9a-f]+[^\/]*)/)
+      if (r = CollectionsHelper.match_uuid_with_optional_filepath(checked))
         UserAgreement.sign uuid: r[1]
       end
     end