2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2021-11-24 14:53:12 +00:00
|
|
|
import Service from 'ember-can/services/can';
|
|
|
|
|
2022-03-15 12:58:14 +00:00
|
|
|
export default class AbilitiesService extends Service {
|
2021-11-24 14:53:12 +00:00
|
|
|
parse(str) {
|
|
|
|
// It's nicer to talk about SSO but technically its part of the authMethod
|
2022-03-15 12:58:14 +00:00
|
|
|
// ability, we probably only need 'use SSO' but if we need more, reassess
|
2021-11-24 14:53:12 +00:00
|
|
|
// the `replace`
|
2022-03-15 12:58:14 +00:00
|
|
|
return super.parse(str.replace('use SSO', 'use authMethods').replace('service', 'zervice'));
|
2021-11-24 14:53:12 +00:00
|
|
|
}
|
|
|
|
}
|