From 214e893fdb23ba95af6cc70141bf0a4c2b8d00f9 Mon Sep 17 00:00:00 2001 From: Arnav Palnitkar Date: Mon, 11 Apr 2022 10:48:35 -0700 Subject: [PATCH] Fix edit capabilities call in auth method (#14966) * Fix edit capabilities call in auth method - Capabilities call was not getting triggered correctly as apiPath method was missing the correct context. * Added changelog --- changelog/14966.txt | 3 +++ ui/app/models/auth-method.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelog/14966.txt diff --git a/changelog/14966.txt b/changelog/14966.txt new file mode 100644 index 000000000000..889294400a2c --- /dev/null +++ b/changelog/14966.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fixes edit auth method capabilities issue +``` \ No newline at end of file diff --git a/ui/app/models/auth-method.js b/ui/app/models/auth-method.js index de82302c8509..ea73dd9031be 100644 --- a/ui/app/models/auth-method.js +++ b/ui/app/models/auth-method.js @@ -116,9 +116,9 @@ export default attachCapabilities(ModelExport, { deletePath: apiPath`sys/auth/${'id'}`, configPath: function (context) { if (context.type === 'aws') { - return apiPath`auth/${'id'}/config/client`; + return apiPath`auth/${'id'}/config/client`.call(this, context); } else { - return apiPath`auth/${'id'}/config`; + return apiPath`auth/${'id'}/config`.call(this, context); } }, });