WIP permission system

This commit is contained in:
Kakarot
2022-03-28 01:24:40 -05:00
parent 1dfdb46105
commit 3bb1023654
6 changed files with 34 additions and 143 deletions
+1 -21
View File
@@ -10,24 +10,4 @@ end)
-- To use this export in a script instead of manifest method
-- Just put this line of code below at the very top of the script
-- local QBCore = exports['qb-core']:GetCoreObject()
-- Get permissions on server start
CreateThread(function()
if QBCore.Config.Server.UseOldPermissionSystem then
local result = MySQL.Sync.fetchAll('SELECT * FROM permissions', {})
if not result then return end
for k, v in pairs(result) do
QBCore.Config.Server.PermissionList[v.license] = {
license = v.license,
permission = v.permission,
optin = true
}
end
else
for i = 1, #QBCore.Config.Server.AllPermissions do
ExecuteCommand(('add_principal group.%s group.admin'):format(QBCore.Config.Server.AllPermissions[i]))
end
end
end)
-- local QBCore = exports['qb-core']:GetCoreObject()