Skip to content

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy