Aperture-Development / MSync-2

Version 2 of MSync - Fully working and extra steak
https://www.Aperture-Development.de
GNU General Public License v3.0
12 stars 1 forks source link

Bugreport - WUMA Restriction System Doesn't like MSync rank assignment style #87

Open Bryantdl7 opened 12 months ago

Bryantdl7 commented 12 months ago

Description When a user loads into a server where they are not cached in the users.txt file of that server, they will have the appropriate rank visibly, however, some addons such as the widely used restriction system WUMA will think the user is the guest role, and assign rights as such.

Reproduction

  1. Give a user a privileged rank with no restrictions
  2. Restrict something easy to reproduce e.g. a prop, or a weapon, like the hl2 revolver
  3. Shut off the server
  4. Delete the users.txt
  5. Reboot server
  6. Have user rejoin
  7. User will have the proper rank, but not be allowed to spawn the hl2 357, etc.

Workaround

  1. Set users ranks using ulx adduserid and then they are cached fully in ulib

Error Messages N/A

This very small use case bug is caused by the way that MSync assigns ranks to users when they load in, more of a bandaid would be to use the function RunConsoleCommand("ulx", "adduserid" , ply:SteamID() , newRank)

Many servers already use auto promote addons which use the above logic, and this makes sure everyone fully has their rank working

ApertureDevelopment commented 12 months ago

I'd prefer an approach which does not require running ulx commands. The alternative approach would be to use ucl functions

ULib.ucl.addUser

I am gonna take a look when I am back home and implement the fix

For reference: https://github.com/TeamUlysses/ulx/blob/master/lua/ulx/modules/sh/user.lua#L51