[Audio] Update equalizer permissions #2813

Merged
aikaterna merged 3 commits from patch-10 into V3/develop 2019-07-14 02:48:14 +02:00
aikaterna commented 2019-06-28 02:02:36 +02:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

Changed the equalizer permissions to be more in line with the rest of Audio's permission mechanics. The DJ role is now used to restrict access to the eq instead of using a mod/admin bot role or the administrator guild permission.

  • All users will be able to manage the eq if DJ role is off and there are no restrictions on subcommand use.
  • If the DJ role is on, and the user does not have the role, they will only be able to view the current eq.
  • Deleting eq presets now follows the same permissions style as playlist deletion. If the person is a bot mod/admin, bot owner, or other generally exempt user, they will be able to delete any eq setting. There is now an author field on eq settings, and if a pleb tries to delete someone else's setting they will not be able to.
  • If someone was using the dev version before these changes were made and they have saved eq settings, there are a few lines to handle that previous eq data storage file arrangement. Since there is no author, the mods/admins will need to be the ones to delete those settings as they will be the only user with authorization to do so.
  • The eq list command output has changed to show author and has a slightly different format.
### Type - [ ] Bugfix - [x] Enhancement - [ ] New feature ### Description of the changes Changed the equalizer permissions to be more in line with the rest of Audio's permission mechanics. The DJ role is now used to restrict access to the eq instead of using a mod/admin bot role or the administrator guild permission. * All users will be able to manage the eq if DJ role is off and there are no restrictions on subcommand use. * If the DJ role is on, and the user does not have the role, they will only be able to view the current eq. * Deleting eq presets now follows the same permissions style as playlist deletion. If the person is a bot mod/admin, bot owner, or other generally exempt user, they will be able to delete any eq setting. There is now an author field on eq settings, and if a pleb tries to delete someone else's setting they will not be able to. * If someone was using the dev version before these changes were made and they have saved eq settings, there are a few lines to handle that previous eq data storage file arrangement. Since there is no author, the mods/admins will need to be the ones to delete those settings as they will be the only user with authorization to do so. * The eq list command output has changed to show author and has a slightly different format.
PredaaA (Migrated from github.com) approved these changes 2019-07-10 02:03:29 +02:00
PredaaA (Migrated from github.com) left a comment

I just tested this PR, all changes that are listed in the description works as intended.

I just tested this PR, all changes that are listed in the description works as intended.
NIXC commented 2019-07-10 02:17:33 +02:00 (Migrated from github.com)

Had a look through as well, couldn't see anything out of the ordinary. Looks good to me.

Had a look through as well, couldn't see anything out of the ordinary. Looks good to me.
Tobotimus (Migrated from github.com) reviewed 2019-07-10 13:48:48 +02:00
Tobotimus (Migrated from github.com) left a comment

I've just got one question for now :)

I've just got one question for now :)
@ -862,3 +868,4 @@
await self._eq_interact(ctx, player, eq, eq_msg_with_reacts, 0)
@eq.command(name="delete")
async def _eq_delete(self, ctx, eq_preset: str):
Tobotimus (Migrated from github.com) commented 2019-07-10 07:58:59 +02:00

Hmm, I'm not sure that this extra API call is necessary, what issues have you found when you use the cached message object?

Hmm, I'm not sure that this extra API call is necessary, what issues have you found when you use the cached message object?
aikaterna (Migrated from github.com) reviewed 2019-07-10 14:10:59 +02:00
@ -862,3 +868,4 @@
await self._eq_interact(ctx, player, eq, eq_msg_with_reacts, 0)
@eq.command(name="delete")
async def _eq_delete(self, ctx, eq_preset: str):
aikaterna (Migrated from github.com) commented 2019-07-10 14:10:59 +02:00

The eq visualizer requires having the message with the reactions or it enters a loop.

The eq visualizer requires having the message with the reactions or it enters a loop.
Tobotimus (Migrated from github.com) approved these changes 2019-07-14 02:47:48 +02:00
Tobotimus (Migrated from github.com) left a comment

Alright, I'm happy with this then 👍

Alright, I'm happy with this then :+1:
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!2813
No description provided.