TomGrobbe / vMenu

vMenu is a custom server sided trainer/menu, built using a custom version of NativeUI. It has full permissions support, so the server owner can decide who's allowed to do what.
https://docs.vespura.com/vmenu
Other
349 stars 372 forks source link

Able to open Misc eithout permission #166

Closed Glamify closed 5 years ago

Glamify commented 5 years ago

Describe the bug Can't disable Misc, my main beef is with developer tools and everything else, only thing I gave permission for was teleport to vMenu.MiscSettings.TeleportToWp that was in misc, but they can still access everything else, and that can be a problem cause they can clear area, and there's also no reason at all to have developer tools

To Reproduce Steps to reproduce the behavior: Well, I don't really know what to put here, I have cleared the cache too

Expected behavior Being able to open misc without permission - And you can't disable anything inside it

Screenshots https://imgur.com/a/MQytrJX

vMenu Info:

Additional context

################################################################
####                builtin.everyone (group)                ####
################################################################

################################
##  ADDING PLAYERS TO GROUP   ## 
################################
add_principal identifier. builtin.everyone 

################################
##     Global Permissions     ## 
################################

################################
##    Online Players Menu     ## 
################################
add_ace builtin.everyone "vMenu.OnlinePlayers.Menu" allow 
add_ace builtin.everyone "vMenu.OnlinePlayers.Teleport" allow 

################################
##    Player Options Menu     ## 
################################
add_ace builtin.everyone "vMenu.PlayerOptions.Menu" allow 
add_ace builtin.everyone "vMenu.PlayerOptions.MaxHealth" allow 
add_ace builtin.everyone "vMenu.PlayerOptions.MaxArmor" allow 
add_ace builtin.everyone "vMenu.PlayerOptions.CleanPlayer" allow 
add_ace builtin.everyone "vMenu.PlayerOptions.WetPlayer" allow 
add_ace builtin.everyone "vMenu.PlayerOptions.Scenarios" allow 
add_ace builtin.everyone "vMenu.PlayerOptions.UnlimitedStamina" allow 

################################
##    Vehicle Options Menu    ## 
################################
add_ace builtin.everyone "vMenu.VehicleOptions.Menu" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.Engine" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.ChangePlate" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.Mod" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.Colors" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.Liveries" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.Components" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.Doors" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.Windows" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.Alarm" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.NoHelmet" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.Lights" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.Delete" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.Underglow" allow 
add_ace builtin.everyone "vMenu.VehicleOptions.FlashHighbeamsOnHonk" allow 

################################
##    Vehicle Spawner Menu    ## 
################################
add_ace builtin.everyone "vMenu.VehicleSpawner.Menu" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.DisableReplacePrevious" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.SpawnByName" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Addon" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Compacts" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Sedans" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.SUVs" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Coupes" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Muscle" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.SportsClassic" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Sports" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Super" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Motorcycles" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.OffRoad" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Industrial" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Utility" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Vans" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Cycles" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Boats" allow 
add_ace builtin.everyone "vMenu.VehicleSpawner.Service" allow 

################################
##    Saved Vehicles Menu     ## 
################################
add_ace builtin.everyone "vMenu.SavedVehicles.Menu" allow 
add_ace builtin.everyone "vMenu.SavedVehicles.Spawn" allow 

################################
##   Player Appearance Menu   ## 
################################
add_ace builtin.everyone "vMenu.PlayerAppearance.Menu" allow 
add_ace builtin.everyone "vMenu.PlayerAppearance.Customize" allow 
add_ace builtin.everyone "vMenu.PlayerAppearance.SpawnSaved" allow 
add_ace builtin.everyone "vMenu.PlayerAppearance.SpawnNew" allow 

################################
##     Time Options Menu      ## 
################################

################################
##    Weather Options Menu    ## 
################################

################################
##    Weapon Options Menu     ## 
################################
add_ace builtin.everyone "vMenu.WeaponOptions.APPistol" allow
add_ace builtin.everyone "vMenu.WeaponOptions.AdvancedRifle" allow
add_ace builtin.everyone "vMenu.WeaponOptions.AssaultRifle" allow
add_ace builtin.everyone "vMenu.WeaponOptions.AssaultRifleMk2" allow
add_ace builtin.everyone "vMenu.WeaponOptions.AssaultSMG" allow
add_ace builtin.everyone "vMenu.WeaponOptions.AssaultShotgun" allow
add_ace builtin.everyone "vMenu.WeaponOptions.BZGas" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Ball" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Bat" allow
add_ace builtin.everyone "vMenu.WeaponOptions.BattleAxe" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Bottle" allow
add_ace builtin.everyone "vMenu.WeaponOptions.BullpupRifle" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.BullpupRifleMk2" allow
add_ace builtin.everyone "vMenu.WeaponOptions.BullpupShotgun" allow
add_ace builtin.everyone "vMenu.WeaponOptions.CarbineRifle" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.CarbineRifleMk2" allow
add_ace builtin.everyone "vMenu.WeaponOptions.CombatMG" allow
add_ace builtin.everyone "vMenu.WeaponOptions.CombatMGMk2" allow
add_ace builtin.everyone "vMenu.WeaponOptions.CombatPDW" allow
add_ace builtin.everyone "vMenu.WeaponOptions.CombatPistol" allow
add_ace builtin.everyone "vMenu.WeaponOptions.CompactGrenadeLauncher" allow
add_ace builtin.everyone "vMenu.WeaponOptions.CompactRifle" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Crowbar" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Dagger" allow
add_ace builtin.everyone "vMenu.WeaponOptions.DoubleAction" allow
add_ace builtin.everyone "vMenu.WeaponOptions.DoubleBarrelShotgun" allow
add_ace builtin.everyone "vMenu.WeaponOptions.FireExtinguisher" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.Firework" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.Flare" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.FlareGun" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Flashlight" allow
add_ace builtin.everyone "vMenu.WeaponOptions.GolfClub" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Grenade" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.GrenadeLauncher" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.GrenadeLauncherSmoke" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Gusenberg" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Hammer" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Hatchet" allow
add_ace builtin.everyone "vMenu.WeaponOptions.HeavyPistol" allow
add_ace builtin.everyone "vMenu.WeaponOptions.HeavyShotgun" allow
add_ace builtin.everyone "vMenu.WeaponOptions.HeavySniper" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.HeavySniperMk2" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.HomingLauncher" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Knife" allow
add_ace builtin.everyone "vMenu.WeaponOptions.KnuckleDuster" allow
add_ace builtin.everyone "vMenu.WeaponOptions.MG" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Machete" allow
add_ace builtin.everyone "vMenu.WeaponOptions.MachinePistol" allow
add_ace builtin.everyone "vMenu.WeaponOptions.MarksmanPistol" allow
add_ace builtin.everyone "vMenu.WeaponOptions.MarksmanRifle" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.MarksmanRifleMk2" allow
add_ace builtin.everyone "vMenu.WeaponOptions.MicroSMG" allow
add_ace builtin.everyone "vMenu.WeaponOptions.MiniSMG" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.Minigun" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.Molotov" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Musket" allow
add_ace builtin.everyone "vMenu.WeaponOptions.NightVision" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Nightstick" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Parachute" allow
add_ace builtin.everyone "vMenu.WeaponOptions.PetrolCan" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.PipeBomb" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Pistol" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Pistol50" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.PistolMk2" allow
add_ace builtin.everyone "vMenu.WeaponOptions.PoolCue" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.ProximityMine" allow
add_ace builtin.everyone "vMenu.WeaponOptions.PumpShotgun" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.PumpShotgunMk2" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.RPG" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.Railgun" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.Revolver" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.RevolverMk2" allow
add_ace builtin.everyone "vMenu.WeaponOptions.SMG" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.SMGMk2" allow
add_ace builtin.everyone "vMenu.WeaponOptions.SNSPistol" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.SNSPistolMk2" allow
add_ace builtin.everyone "vMenu.WeaponOptions.SawnOffShotgun" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.SmokeGrenade" allow
add_ace builtin.everyone "vMenu.WeaponOptions.SniperRifle" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Snowball" allow
add_ace builtin.everyone "vMenu.WeaponOptions.SpecialCarbine" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.SpecialCarbineMk2" allow
#add_ace builtin.everyone "vMenu.WeaponOptions.StickyBomb" allow
add_ace builtin.everyone "vMenu.WeaponOptions.StunGun" allow
add_ace builtin.everyone "vMenu.WeaponOptions.SweeperShotgun" allow
add_ace builtin.everyone "vMenu.WeaponOptions.SwitchBlade" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Unarmed" allow
add_ace builtin.everyone "vMenu.WeaponOptions.VintagePistol" allow
add_ace builtin.everyone "vMenu.WeaponOptions.Wrench" allow

################################
##     Misc Settings Menu     ## 
################################
vMenu.MiscSettings.TeleportToWp
################################
##  Voice Chat Settings Menu  ## 
################################
add_ace builtin.everyone "vMenu.VoiceChat.Menu" allow 
add_ace builtin.everyone "vMenu.VoiceChat.ShowSpeaker" allow 

Both of these can very easily be provided by using /vmenuclient dump while in-game and sending the CitizenFX.log file (FiveM Application Data\CitizenFX.log) from that same game session.

TomGrobbe commented 5 years ago

The default features in there that you can't disable using permissions or convars are absolutely harmless. Things like clear area are restricted by permissions, so that's not true that you can't disable it.

In fact, things like "save preferences" and the keyboard hotkeys should always be accessible (the latter because all users should be able to choose to disable them if they want to).

So is this a bug report or a feature request?

TomGrobbe commented 5 years ago
vMenu.MiscSettings.All Grants access to ALL Misc Settings Menu options. Allowed
vMenu.MiscSettings.ClearArea Allows you to reset/clear everything 100m around you in the world. Allowed
vMenu.MiscSettings.TeleportToWp Allows you to teleport to the waypoint on your map. Allowed
vMenu.MiscSettings.ShowCoordinates Allows you to show your current coordinates on screen. Allowed
vMenu.MiscSettings.ShowLocation Allows you to show your current location on screen (pretty much just like PLD). Allowed
vMenu.MiscSettings.JoinQuitNotifs Allows you to receive join/quit notifications when someone joins/quits the server. Allowed
vMenu.MiscSettings.DeathNotifs Allows you to receive death notifications when someone dies or gets killed. Allowed
vMenu.MiscSettings.NightVision Allows you to toggle night vision on/off. Allowed
vMenu.MiscSettings.ThermalVision Allows you to toggle thermal vision on/off. Allowed
vMenu.MiscSettings.LocationBlips Allows you to enable pre-defined map location blips, configured in the locations.json file. Allowed
vMenu.MiscSettings.PlayerBlips Allows you to show player blips. Allowed
vMenu.MiscSettings.OverheadNames Allows you to show player overhead names. Allowed
vMenu.MiscSettings.TeleportLocations Allows you to teleport to pre-configured locations, configured in the locations.json file. Allowed
vMenu.MiscSettings.ConnectionMenu Allows you to use the “Connection Options” menu (things like, disconnect from server, quit the game and “disconnect from session”). Allowed
vMenu.MiscSettings.RestoreAppearance Allows you to enable this option in the Misc Settings menu, which will restore your player ped/skin whenever your ped dies and respawns. Will not restore the ped if you (re)join. (only in vMenu v1.5.0 and up) Allowed
vMenu.MiscSettings.RestoreWeapons Allows you to enable this option in the Misc Settings menu, which will restore your weapons whenever your ped dies and respawns. Will not restore the weapons if you (re)join. (only in vMenu v1.5.0 and up) Allowed
vMenu.MiscSettings.DriftMode Allows you to enable the drift mode keybind option in the misc settings menu. Allowed

Copied from the docs...

Glamify commented 5 years ago

I still have access to it in testing.

TomGrobbe commented 5 years ago

Access to what exactly? The misc settings menu? You're supposed to have access to that..

Glamify commented 5 years ago

Correction, I can still clear area even without the perm

TomGrobbe commented 5 years ago

You must still be giving access to that somewhere then, because it's literally impossible to see that button if you don't have permissions for it.

Proof: https://github.com/TomGrobbe/vMenu/blob/3e18184f4ea3108152077c30c471060bf6b94134/vMenu/menus/MiscSettings.cs#L386-L390

Glamify commented 5 years ago

I tried using Remove_ace and that fixed it.