Main menu based on user role

Hi Team,

I`m using Metronic 8 with Vuejs. Main menu is generated in Menu.vue and its looping through DocMenuConfig.
Can you please advice me how to change menu items based on logged user role?
I`'d like to create e.g four such a Configs: menuAdmin, menuUser, etc ... and switch it depending on logged user role.

Text formatting options
Submit

Replies (1)

Hi Krystian,

You can add a new property for menu items. For example, you can add a property called "role", then depending on the role render your menu, you can use our auth vuex module to get the user's role.

Regards,
Lauris Stepanovs,
Keenthemes Support Team

Text formatting options
Submit
Text formatting options
Submit