[Permissions] Allow all commands to be allowed/denied in a channel #2516
Labels
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot#2516
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Select the type of feature you are requesting:
Describe your requested feature
A similar feature already exists in core with the [p]ignore command, however red responds to commands from users with discord manage channel and server permissions. With this feature implemented the bot owner or admin(s) could deny an entire channel for people with the above discord permissions. If this were added I expect it would look something like
[p]permissions setdefaultserverrule <allow_or_deny> <who_or_what>.A different way to implement it would be to be to add a method of referencing all of the bot's commands as one cog, such as "All". If this way was chosen the current syntax for the command would still be entirely valid.
I don't think this belongs in permissions, but I still think this is worth supporting.
If this were to be added to permissions, adding an all commands default would not necessarily help you, as the only logical place for it to have precedence would be below specific defaults, which are below specific rules, but you're specifically asking for a version which wouldn't be overridden by other choices.
From my understanding, the reason ignore makes exceptions for those permissions is to prevent an accidental lockout, but this can be solved differently by excluding the unignore command from that specific global check.
If this is an accurate understanding of that specific design choice, This would allow ignore to work for this here.
Another alternative would be to support channels in the blacklist/whitelist commands (and their local counterparts) and exclude the bot owner from their influence (and the guild owner for the local ones) to prevent lockout.
I do think that these rules should be able to be overridden by other permissions set by the permissions cog. As I understand it currently, if I wanted to disable all cogs but one in a text channel at the moment, I would have to disable every loaded cog individually, except the one I wanted left enabled. This is what I would like to make easier.
The best way to do this in my opinion would be to have a way of referencing all cogs like my second implementation suggestion earlier shows. I apologise for being too vague in my first post too.
Also, I do see use in your good blacklist/whitelist commands idea, as I believe that it would make sense to have that in core. If I were to extend the idea further, this could be used on servers too, making the
[p]ignorecommand redundant. This would need your suggested improvement to the[p]ignorecommand for preventing an accidental lockout in order to be of most use though.Okay, if you want it overridden (Sorry I misunderstood that), this brings up another possible issue: we would either need an identifier which suitably represents this, but can't be a cog or command name (My vote would be an
*) or we would need a separate command to manage this type of default.Because of the way the permission system works currently, this also could introduce a way for a guild owner who is not a bot owner to accidentally get locked out of using the bot on their server without taking this into account with the changes.
(Recommendation: A command issuable by guild owner only which isn't changed by permissions to send current ACL and reset guild permissions, hidden)
This does not need to have a corresponding escape command for the owner as permission models do not apply to the bot owner.
Yes, I like the idea of using
*for this. I also like your recommendation as I think it'll be easy to understand from a user perspective and, I would assume, relatively easy to implement. Thanks for all your help on this.Hi I'm am interested in working on this! Can I get this assigned?
Hi, I'm sorry but this issue should have been labeled as "Needs discussion" - we need to put a design for consideration and probably coordinate it with designing for other feature requests for our rules system in Permissions cog.
Pull requests made for this issue are very likely to be rejected at the current moment so I would advise not to put coding work into it.
Offene Diskussion bzw. Feature-Wunsch mit geringem Nutzen im Verhältnis zum Aufwand (oder Nischenfall), der seit Langem ohne Ergebnis offen ist. Ich schließe das Issue; bei konkretem Bedarf kann es gern wieder geöffnet werden.
Generated by Claude Code