open-consul/ui-v2/app/helpers/token/is-legacy.js

10 lines
269 B
JavaScript
Raw Normal View History

import { helper } from '@ember/component/helper';
import { get } from '@ember/object';
export function isLegacy(params, hash) {
const token = params[0];
return get(token, 'Legacy') || typeof get(token, 'Rules') !== 'undefined';
}
export default helper(isLegacy);