Allow console channel to be filtered by user ID
thewilloftheshadow opened this issue ยท 2 comments
Why?
Adding this will allow users who may not be the Discord server owner but run the Minecraft server to prevent staff with higher permissions from abusing their permissions in Discord to run any commands in the console.
What and How?
This could be done by adding a simple array check against the config to see if the user IDs match the whitelisted ones in the config.
Are there alternatives?
For now, what I have told people to do is setup the console channel also as a dummy "console" chat channel and enable the !c commands for only their role. Then enable an empty whitelist on the console channel.
The problem with this is that it relies on a role, and high permission staff can still just add this role
Checks
- I have used the search at least once to check if my idea has already been suggested and perhaps already implemented.
Anything else
No response
I might be mistaken on this, but here goes.
I believe you can set up roles that have no admin/mod like permissions for the sole purpose of it being a role. If it's placed above the roles of others who have control over assigning roles, then they can't assign it to themselves, it has to be assigned to them. Likewise, simply having that role won't grant the ability to do anything to those who are otherwise admins/mods. Using that, a role could still be used for having DiscordSRV decide who is or isn't allowed to issue commands via the console channel.
I'm not 100% certain of the above, but I have a feeling that it is how it works. The role could be used for no other reason than to provide posting access to a particular channel, and despite someone having that role and it being above admins/mods, that someone would still be limited on their access by comparison. You would have to experiment to make sure.
That said, RoleID and UserID permissions wouldn't be a bad combination. RoleID for groups that should definitely have the access, and UserID for specific people who shouldn't have the RoleID for other reasons. (Might be a co-owner like role for example, and the specific person might just be an admin of the mc server but not of the Discord server, and your concern comes into play as well.)