vault/ui/app/adapters/permissions.js
Chelsea Shaw cdd88d56af
UI: Correctly call resultant-acl endpoint when user root is root (#25766)
* Correctly call resultant-acl endpoint when user root is root

* check test differently

* Add changelog
2024-03-05 17:36:00 +00:00

18 lines
432 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import ApplicationAdapter from './application';
export default ApplicationAdapter.extend({
query() {
const namespace = this.namespaceService.userRootNamespace ?? this.namespaceService.path;
return this.ajax(this.urlForQuery(), 'GET', { namespace });
},
urlForQuery() {
return this.buildURL() + '/internal/ui/resultant-acl';
},
});