We previously relied on user roles to determine whether to render specific routes in our frontend components. A permissions-based model is replacing this approach. Follow up: #9695 Co-authored-by: Pranav <pranavrajs@gmail.com>
32 lines
710 B
JavaScript
32 lines
710 B
JavaScript
import { frontendURL } from '../../../../helper/URLHelper';
|
|
const SettingsContent = () => import('../Wrapper.vue');
|
|
const AgentHome = () => import('./Index.vue');
|
|
|
|
export default {
|
|
routes: [
|
|
{
|
|
path: frontendURL('accounts/:accountId/settings/agents'),
|
|
component: SettingsContent,
|
|
props: {
|
|
headerTitle: 'AGENT_MGMT.HEADER',
|
|
icon: 'people',
|
|
showNewButton: false,
|
|
},
|
|
children: [
|
|
{
|
|
path: '',
|
|
redirect: 'list',
|
|
},
|
|
{
|
|
path: 'list',
|
|
name: 'agent_list',
|
|
component: AgentHome,
|
|
meta: {
|
|
permissions: ['administrator'],
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
};
|