mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 00:01:20 +00:00
fix(es_extended): remove admin fallback for superadmin group
This commit is contained in:
@@ -271,16 +271,7 @@ function loadESXPlayer(identifier, playerId, isNew)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Group
|
-- Group
|
||||||
if result.group then
|
userData.group = result.group or "user"
|
||||||
if result.group == "superadmin" then
|
|
||||||
userData.group = "admin"
|
|
||||||
print("[^3WARNING^7] ^5Superadmin^7 detected, setting group to ^5admin^7")
|
|
||||||
else
|
|
||||||
userData.group = result.group
|
|
||||||
end
|
|
||||||
else
|
|
||||||
userData.group = "user"
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Loadout
|
-- Loadout
|
||||||
if not Config.CustomInventory then
|
if not Config.CustomInventory then
|
||||||
|
|||||||
@@ -510,11 +510,9 @@ ESX.RegisterCommand(
|
|||||||
if not args.playerId then
|
if not args.playerId then
|
||||||
args.playerId = xPlayer.source
|
args.playerId = xPlayer.source
|
||||||
end
|
end
|
||||||
if args.group == "superadmin" then
|
|
||||||
args.group = "admin"
|
|
||||||
print("[^3WARNING^7] ^5Superadmin^7 detected, setting group to ^5admin^7")
|
|
||||||
end
|
|
||||||
args.playerId.setGroup(args.group)
|
args.playerId.setGroup(args.group)
|
||||||
|
|
||||||
if Config.AdminLogging then
|
if Config.AdminLogging then
|
||||||
ESX.DiscordLogFields("UserActions", "/setgroup Triggered!", "pink", {
|
ESX.DiscordLogFields("UserActions", "/setgroup Triggered!", "pink", {
|
||||||
{ name = "Player", value = xPlayer and xPlayer.name or "Server Console", inline = true },
|
{ name = "Player", value = xPlayer and xPlayer.name or "Server Console", inline = true },
|
||||||
|
|||||||
Reference in New Issue
Block a user