Admin Menu perms

Hey guys,

Somewhat new to working with LUAs and trying to learn as I go, but I’m unsure how to complete the task I’m trying to do now. I’m working with the adminmenu and I’m trying to restrict certain menus in the admin menu to different staff ranks. I have added the ranks into the lua with proper levels and those seem to work. However, when looking into the client.lua, I can see the different menus there, with their icons, descriptions and other things, but I’m not seeing a place for permissions. Is there a way to add a permission line or a rank check to be able to access certain menus (kind of like vMenu does it)?

For example:

–vehicle spawner
icon = ‘:red_car:’,
label = Lang:t(“menu.vehicles”),
value = menu5,
description = Lang:t(“desc.vehicles_desc”),
permission = ‘admin’

–dealer list
local menu1_dealer_list = menu1:AddButton({
icon = ‘:pill:’,
label = Lang:t(“menu.dealer_list”),
value = menu6,
description = Lang:t(“desc.dealer_desc”),
permission = ‘mod’

–developer options
icon = ‘:wrench:’,
label = Lang:t(“menu.developer_options”),
value = menu7,
description = Lang:t(“desc.developer_desc”),
permission = ‘god’,

Something along those lines? Or is it more advanced than that?

A simple solution I can think is: uses a callback from the server to the client, where the client asks to know what its ‘group’ or permissions are, so it gets the data from the server to the client and can manipulate the menus to its liking.