v3.0.1
Fixed
-
Your team could not open the admin dashboard, even though the group was set in your
server.cfg. Two things were stacked on top of each other here. First, FiveM keeps principals and ace objects apart: a line likeadd_principal identifier.license:xxx group.adminonly makes that player a member of the group, it does not create the ace object of the same name that the check was looking for. Unless someone had also writtenadd_ace group.admin group.admin allowby hand, the check came back empty. Second, the frameworks do not even agree on how a group principal is named. ESX usesgroup.admin, QBCore usesqbcore.admin, and that is not something you can configure away: it is what/addpermissionandQBCore.Functions.AddPermissionwrite. QBCore also only ever linksqbcore.godtogroup.admin, so anyone below god level was a member of nogroup.*principal at all. On ESX this often stayed invisible, because there the group from theuserstable caught it, and that fallback does not exist on QBCore. The script now registers its own ace object per group on start and points both spellings at it, foradmin, for every group inConfig.dashboardGroupsand for every group in the permission matrix. A plainadd_principal ... group.modand a/addpermission 1 modboth get you in now, and groups you add on the Permissions tab are covered right away without a restart. -
Checking a group name on the Permissions tab reported "not found" for brand new groups. The check ran before the group existed as an ace object, so it could never find anyone in it. The group is registered first now.
-
Access denied for command add_acespam on every server start. FiveM checksadd_aceagainst the resource that runs it, and no resource holds that right by default. The ace objects were therefore never actually created, every attempt was refused and only printed an error. On ESX this went unnoticed because the framework group caught it. The aces are registered through msk_core now, which is the one resource yourserver.cfgalready grants that right, and the script checks up front whether it is allowed instead of spamming the console.
This release uses MSK.AddRawAce and MSK.CanAddAce, both added in msk_core 3.3.0. Update msk_core
along with this script, and make sure your server.cfg has the msk_core ace lines (they are the ones
the msk_core documentation has always listed and they cover every MSK script at once):
add_ace resource.msk_core command.add_ace allow
add_ace resource.msk_core command.remove_ace allow
add_ace resource.msk_core command.add_principal allow
add_ace resource.msk_core command.remove_principal allow
If they are missing nothing breaks, the script says so on start and group access falls back to your framework group.
There is nothing to rebuild and no database change. Replace the resource files and restart it.
QBCore's staff levels are god, admin and mod. Put the ones that should reach the
dashboard into Config.dashboardGroups, admin is always allowed and user is always
denied. On ESX the names are whatever you use in your add_principal lines.
Changed files
fxmanifest.lua
server/admin/permissions.lua
server/admin/boot.lua
server/admin/api.lua