Improve the archive command#303
Conversation
CarrotManMatt
left a comment
There was a problem hiding this comment.
Please can you provide more information about why all of the fine-grained permissions have been removed? The existing functionality ensures that the channel/category retains the correct committee permissions after archiving.
|
The issue around users being able to see names of channels that are committee only isn't an issue, because the stats command does the same as does statbot |
|
Also not sure what you mean about the permissions - this method syncs permissions to the archive channel which handles all the permissions automatically for all the channels in that category, doing it one by one in this cog is unnecessary. |
Just because other places make some poor security decisions, doesn't mean everywhere should. I think our stats command should eventually be removed/have this viewing bug fixed (eventually™). Can the additional check you added of making sure the term |
CarrotManMatt
left a comment
There was a problem hiding this comment.
- On line 36,
autocomplete_get_categories()method should be renamed toautocomplete_get_non_archival_categories() - Retrieval of the destination category in the
archive-channelcommand should only be done after the checks for the selected channel are completed, rather than happening at the same time
After completing a more thorough review I do now see why the commands have to be separate, however I still also believe the UX may need some improvement as it's not entirely obvious from the outset as to how these should be used without understanding the implementation.
I'll be happy to approve and merge (after the requested changes in this review of course) without the improvements to the UX, but if you have any ideas they would be appreciated.
Co-authored-by: Matt Norton <matt@carrotmanmatt.com>
da7b611 to
69e7ac5
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR improves the archiving functionality by refactoring the archive command into two distinct commands—one for archiving categories and one for channels—and by updating autocomplete functions accordingly.
- Renames and refactors the archive command to archive-category and archive-channel.
- Introduces new autocomplete functions for non-archival and archival categories, and for non-archived channels.
- Adds an option to allow archivist access for archived categories.
No description provided.