From 34e1b8be1d55d85565d80728270057f89393fb40 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Fri, 13 Sep 2019 13:03:15 -0400 Subject: [PATCH] make default params only accept page, page_size and order_by --- awx/ui_next/src/util/qs.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/ui_next/src/util/qs.js b/awx/ui_next/src/util/qs.js index 2a268dc08d..31a6df4c48 100644 --- a/awx/ui_next/src/util/qs.js +++ b/awx/ui_next/src/util/qs.js @@ -166,6 +166,8 @@ export function getQSConfig( ) { if (!namespace) { throw new Error('a QS namespace is required'); + } else if (Object.keys(defaultParams).filter(key => key !== 'page' || key !== 'page_size' || key !== 'order_by').length > 0) { + throw new Error('Only page, page_size, and order_by allowed as default params for QS.') } return { namespace,