-
-
Notifications
You must be signed in to change notification settings - Fork 173
AdminManager fixes (root flags in RequirePermissionsOr, registering admin groups) #700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
public override bool CanExecuteCommand(SteamID? steamID) | ||
{ | ||
if (caller == null) return true; | ||
if (AdminManager.PlayerHasCommandOverride(caller, Command)) | ||
if (steamID == null) return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this reliable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be. SteamID null checks are peppered throughout core AdminManager functions, including PlayerHasCommandOverride itself, and I haven't seen any bug reports these functions failing.
…e, cleaned up file includes
Apologies for letting this branch go stale. Life has gotten in the way of me being able to complete this, and a new bug in AdminManager came to light from r3tr0attack, which I've included a fix and some new tests for in this PR. |
Addresses #699 and a report by r3tr0attack on Discord where admin groups were not appropriately registered at runtime after the AdminData class was created.