Adding ACL scope to reminder remove#93
Merged
semper-lux merged 2 commits intodiscord-math:mainfrom Oct 24, 2025
Merged
Conversation
mniip
reviewed
Oct 24, 2025
plugins/reminders.py
Outdated
| """Delete a reminder.""" | ||
| async with sessionmaker() as session: | ||
| if reminder := await session.get(Reminder, id): | ||
| # Checking if reminder creator and author are different users |
Member
There was a problem hiding this comment.
This comment is just repeating what the code directly next to it is saying. Comments are for explaining long-distance interactions or large-scale architecture in the code. A better comment would be:
# To remove another user's reminders you need elevated permissions
Contributor
Author
There was a problem hiding this comment.
I wasn't sure this needed any commenting, to be honest; I will update to your suggestion!
Done: b57f0cf
Member
There was a problem hiding this comment.
I would say no comment is needed at all, but I'm also famously leaving way too few comments, so...
mniip
approved these changes
Oct 24, 2025
semper-lux
added a commit
to semper-lux/mathcordbot-dani
that referenced
this pull request
Oct 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #86
Creates new acl action
manage_reminders. Users with the acl corresponding to this action (likely should be theminimodsacl) will be able to remove other user's reminders. Users without that acl will only be able to remove their own, once thereminder removecommand is returned to theremindersacl.