Skip to content
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

Fix 125 Toolshed Commands Being Unusable for Anyone without +HOST #572

Merged

Conversation

Mnemotechnician
Copy link
Contributor

@Mnemotechnician Mnemotechnician commented Jul 20, 2024

Description

For reasons unknown, AdminManager has two command permission managers: _commandPermissions and _toolshedCommandPermissions. It used to load normal command permissions into the former, and toolshed command permissions into the latter. Since _toolshedCommandPermissions is NEVER actually used in checking whether a player can execute a command, all toolshed commands remained unavailable to anyone without +HOST.

This PR provides a bandaid fix for that: it makes it so that the same permissions are loaded into both managers at the same time. It's necessary to load them into _commandPermissions in order to allow regular players to execute them, and it's also necessary to load them into _toolshedCommandPermissions because otherwise the ToolshedManager will complain about those commands lacking permission flags.

This should also fixes some commands such as spawn, pos, comp being inaccessible to admins with +DEBUG and more.

Media

image

image

Admin-only commands are unaffected:

image


Changelog

🆑

  • fix: Fixed toolshed command permissions. This will mostly affect admins who don't have full host access.

@github-actions github-actions bot added the Changes: C# Changes any cs files label Jul 20, 2024
@SimpleStation14 SimpleStation14 changed the title Fix 125 toolshed commands being unusable for anyone without +HOST Fix 125 Toolshed Commands Being Unusable for Anyone without +HOST Jul 20, 2024
@DEATHB4DEFEAT
Copy link
Member

For reasons unknown

Is math done by the server?

@Mnemotechnician
Copy link
Contributor Author

Is math done by the server?

Supposedly so, although we can easily lock these commands behind +ADMIN if needed.

@DEATHB4DEFEAT
Copy link
Member

Is math done by the server?

Supposedly so, although we can easily lock these commands behind +ADMIN if needed.

If the server is doing math it makes sense to restrict it.

@Mnemotechnician
Copy link
Contributor Author

The thing is, this is a bug that prevented anyone without +HOST from using any commands listed in that file. I can add an admin flag to these commands if you want specifically that.

@github-actions github-actions bot added the Changes: YML Changes any yml files label Jul 21, 2024
@Mnemotechnician
Copy link
Contributor Author

Here.
image

@DangerRevolution DangerRevolution merged commit faa239a into Simple-Station:master Jul 29, 2024
13 checks passed
SimpleStation14 added a commit that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: YML Changes any yml files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants