Skip to content
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

Merged

Conversation

phutchins
Copy link
Contributor

@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 like message-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 containing delete-any-message and delete-message but with the way that the blockDeleteInMinutes 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.

@CLAassistant
Copy link

CLAassistant commented May 9, 2017

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@marceloschmidt marceloschmidt left a 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.

@phutchins
Copy link
Contributor Author

Thanks @marceloschmidt!

@phutchins
Copy link
Contributor Author

@marceloschmidt our of curiousity, whats the merge release frequency/schedule look like for this?

@marceloschmidt
Copy link
Member

Ah, that's a tough question :( let me see if I can speed it up.

@engelgabriel engelgabriel added this to the 0.57.0 milestone May 10, 2017
@rodrigok rodrigok merged commit d6883a0 into RocketChat:develop May 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants