Skip to content

Conversation

zonical
Copy link
Collaborator

@zonical zonical commented Dec 4, 2024

Addresses #699 and a report by r3tr0attack on Discord where admin groups were not appropriately registered at runtime after the AdminData class was created.

@zonical zonical requested a review from roflmuffin as a code owner December 4, 2024 07:53
Comment on lines +14 to +16
public override bool CanExecuteCommand(SteamID? steamID)
{
if (caller == null) return true;
if (AdminManager.PlayerHasCommandOverride(caller, Command))
if (steamID == null) return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this reliable?

Copy link
Collaborator Author

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.

@zonical zonical changed the title Fix handling of root flags in RequirePermissionsOr AdminManager fixes (root flags in RequirePermissionsOr, registering admin groups) Mar 21, 2025
@zonical
Copy link
Collaborator Author

zonical commented Mar 21, 2025

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.

@zonical zonical requested a review from roflmuffin March 21, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants