qb-core icon indicating copy to clipboard operation
qb-core copied to clipboard

Help with permissions on cfg

Open iglesiiaskeviin opened this issue 2 years ago • 8 comments

Does anyone know how permissions can be reset for different administrative groups? Suppose the mod group can use /tpm inside the server

What should I edit in the cfg to allow that command?

iglesiiaskeviin avatar Jun 16 '22 04:06 iglesiiaskeviin

You can set them as a principal of the desired rank and then for each of the commands you'll see like

end, 'god') or end, 'admin') <- the rank there in quotes is what they'd have access to depending on what they are set as in the cfg

GhzGarage avatar Jun 16 '22 05:06 GhzGarage

Resources

add_ace resource.qb-core command allow # Allow qb-core to execute commands

Gods

add_ace qbcore.god command allow # Allow all commands add_ace qbcore.mod "tpm" allow # allow use tpm to mod rank

Inheritance

add_principal qbcore.god group.admin # Allow gods access to the main admin group used to get all default permissions add_principal qbcore.god qbcore.admin # Allow gods access to admin commands add_principal qbcore.admin qbcore.mod # Allow admins access to mod commands add_principal qbcore.mod # Allow admins access to mod commands

Add system admins

add_ace group.admin command.quit deny # but don't allow quit add_principal identifier.license:####################### group.mod

I have tried this and I have put my identifier and the group.mod and in the same way I cannot use the /tpm command despite the fact that it has been detailed in the cfg that this command is allowed for the mod group.

Sorry but I don't understand anything xd

iglesiiaskeviin avatar Jun 16 '22 15:06 iglesiiaskeviin

That's not how you do it, just add yourself as a principal for the rank you want and modify the commands to the level you want

GhzGarage avatar Jun 16 '22 18:06 GhzGarage

I think something is missing because I have done what you have told me in this way

add_principal identifier.license:aa1c5cc05e88322f2ad4a803e3b9b00dffaaab43 group.mod

and i put in commands.lua into qb-core the /tpm command to 'mod' and i cannot use it ...

iglesiiaskeviin avatar Jun 16 '22 18:06 iglesiiaskeviin

Update your core and try again

GhzGarage avatar Jun 16 '22 21:06 GhzGarage

hi admin.. how to set permission access QBConfig.Server.Closed = false -- Set server closed (no one can join except people with ace permission 'qbadmin.join'). when i true .. i cant join server . but i already put add_principal identifier.license:xxxxxx qbcore.admin

RenggoStarz avatar Jun 20 '22 07:06 RenggoStarz

I think something is missing because I have done what you have told me in this way

add_principal identifier.license:aa1c5cc05e88322f2ad4a803e3b9b00dffaaab43 group.mod

and i put in commands.lua into qb-core the /tpm command to 'mod' and i cannot use it ...

try adding fivem identifier works good for me add_principal identifier.fivem:2313548 group.mod #someusername

sebastianqntnll avatar Jun 24 '22 13:06 sebastianqntnll

hi admin.. how to set permission access QBConfig.Server.Closed = false -- Set server closed (no one can join except people with ace permission 'qbadmin.join'). when i true .. i cant join server . but i already put add_principal identifier.license:xxxxxx qbcore.admin

Go to resources/[qb]/qb-core/server/events.lua go to around line 30 and change this,

    if QBCore.Config.Server.Closed then
        if not IsPlayerAceAllowed(src, 'command') then -- <-- this is a other check, so you as admin or god can still connect
        --if not IsPlayerAceAllowed(src, 'qbadmin.join') then -- uncommand this if statement
            deferrals.done(QBCore.Config.Server.ClosedReason)
        end
    end

this is this a temp fix but it works :)

MaDHouSe79 avatar Jun 28 '22 14:06 MaDHouSe79