[V3] Permissions #1548

Merged
mikeshardmind merged 65 commits from V3/permission-cog into V3/develop 2018-05-28 00:17:17 +02:00
mikeshardmind commented 2018-04-19 01:46:56 +02:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

Sets up an extended, higher level permission model

### Type - [ ] Bugfix - [ ] Enhancement - [X] New feature ### Description of the changes Sets up an extended, higher level permission model
palmtree5 (Migrated from github.com) reviewed 2018-04-19 01:46:56 +02:00
tekulvw (Migrated from github.com) reviewed 2018-04-19 01:46:56 +02:00
Twentysix26 (Migrated from github.com) reviewed 2018-04-19 01:46:56 +02:00
Tobotimus (Migrated from github.com) reviewed 2018-04-19 01:46:56 +02:00
mikeshardmind commented 2018-04-19 21:14:25 +02:00 (Migrated from github.com)

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.

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.
mikeshardmind commented 2018-05-05 01:43:52 +02:00 (Migrated from github.com)

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 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.
mikeshardmind commented 2018-05-05 19:51:21 +02:00 (Migrated from github.com)

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.

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.
mikeshardmind commented 2018-05-21 13:36:09 +02:00 (Migrated from github.com)

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

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
palmtree5 commented 2018-05-24 23:05:41 +02:00 (Migrated from github.com)

Ok, to put these thoughts here:

A few requests:

  1. Documentation on the yaml for adding a bunch of rules in one go
  2. Some way of setting defaults outside of yaml
  3. A method of wiping all configured server/global rules at once

Otherwise, the docs look good so far and I'm not finding any major issues in testing this

Ok, to put these thoughts here: A few requests: 1. Documentation on the yaml for adding a bunch of rules in one go 2. Some way of setting defaults outside of yaml 3. A method of wiping all configured server/global rules at once Otherwise, the docs look good so far and I'm not finding any major issues in testing this
mikeshardmind commented 2018-05-25 01:48:19 +02:00 (Migrated from github.com)

@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)

@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)
mikeshardmind commented 2018-05-25 06:41:51 +02:00 (Migrated from github.com)

All user facing commands and normal operation permission logic has been tested and confirmed to be working.

All user facing commands and normal operation permission logic has been tested and confirmed to be working.
mikeshardmind commented 2018-05-25 07:11:03 +02:00 (Migrated from github.com)

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.

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.
Kowlin (Migrated from github.com) approved these changes 2018-05-28 00:08:27 +02:00
Sign in to join this conversation.
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
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!1548
No description provided.