[V3] Permissions #1548
No reviewers
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot!1548
Loading…
Reference in a new issue
No description provided.
Delete branch "V3/permission-cog"
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?
Type
Description of the changes
Sets up an extended, higher level permission model
I've added a way to handle specific checks that may be desirable to use a different resolution order than default in here as well. This is still a WIP.
This was turning into an interactive hell. This will be manageable by uploaded yaml file (with modes for both update and set) in the initial iteration. There will be a template provided, and a method to show the current yaml equivalent and to clear all.
This will be extensively documented, and anyone can add a more user friendly interface at a later point if they feel they would fare better on designing it.
This is ready for review. None of the check logic has any reason to change at this point unless a flaw is found in it. There's an example template in there for the expected input format as well. I'll update with real documentation later, but it won't be today.
This also needs a couple user utility functions to get the IDs which correspond to various objects.
At a later date, I'd like to see this manageable via webpanel, but the level of interactivity needed to do this as discord commands, even with emoji in play was getting overly complex.
Fixed the issues with the permission cog which were introduced earlier:
On my todo list:
extra commands for individually adding items to existing rule sets
extra command to generate table of rolenames -> roleids for use with yaml
docs for end users
On my todo list, but not a priority:
documentation for what is required to properly override the default permission cog
Ok, to put these thoughts here:
A few requests:
Otherwise, the docs look good so far and I'm not finding any major issues in testing this
@palmtree5 I've added the requested extra commands. I'll update the docs with the yaml usage a little later as well.
Ideally, after RPC is implemented, this could pave the way for a nicely designed webpage managing this. As it is however, the yaml syntax is easy enough for anyone wanting to design a page that could generate a yaml file for use from a guild (would require OAuth scopes)
All user facing commands and normal operation permission logic has been tested and confirmed to be working.
This is ready for merge as far as I'm concerned. There's an argument to be made for additional documentation beyond what is provided regarding the additional check system, but the core permissions cog works as intended now (as do the hooks for additional rules registered by 3rd party cogs)
Those hooks have documentation in docstrings, but if we want a full usage guide for them for developers, I can write that tommorow.