-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEW] Feature/delete any message permission #6919
[NEW] Feature/delete any message permission #6919
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably rename delete-any-message
to force-delete-message
but all the rest is looking good.
Thanks @marceloschmidt! |
@marceloschmidt our of curiousity, whats the merge release frequency/schedule look like for this? |
Ah, that's a tough question :( let me see if I can speed it up. |
@RocketChat/core
This addresses: #4921
Summary
This adds an option called delete-any-message (maybe we should rename), which by default allows admins and owners to delete any message overriding the time window for deletion.
Solves...
The problem that this solves is when you have
Block Message Deleting After (n) Minutes
turned on, once that timeframe has expired, even admins and owners cannot delete messages without temporarily turning this setting off.Considerations
Setting Name
Currently the setting is named
delete-any-message
but I've considered something likemessage-delete-block-override
and am open to suggestions...Permission Retrieval
I'm using hasAtLeastOnePermisison, with one permisison, to find the permission and do the conditionals. I would have liked to use
hasPermission
with an array containingdelete-any-message
anddelete-message
but with the way that theblockDeleteInMinutes
is structured, it proved difficult so I've left it this way. It works fine this way but I'm open to suggestions on how to handle this if there are better ideas.Tests
Tests are passing...
I've not written any tests to cover this yet. There may be tests that cover this mostly but wanted input before writing any tests. Suggestions welcome.