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

An administrator should be able to delete any message #4921

Closed
n3wtron opened this issue Nov 10, 2016 · 9 comments
Closed

An administrator should be able to delete any message #4921

n3wtron opened this issue Nov 10, 2016 · 9 comments

Comments

@n3wtron
Copy link
Contributor

n3wtron commented Nov 10, 2016

Rocket.Chat version: 0.45
An administrator (and a channel owner/moderator?) should not follow the rules set in the Deleting message settings (i.e. "Block Message Deleting After (n) Minutes").

@marceloschmidt
Copy link
Member

Maybe have a new permission to override time block? There might be instances where an administrator would not want even owners to delete messages.

@n3wtron
Copy link
Contributor Author

n3wtron commented Nov 11, 2016

I agree, a new permission that permit administrators/moderators/channel owner to delete in every case a message (bypassing global settings about time deletion).

@heunland
Copy link

We have experienced the same problem on our rocketchat at https://community.storj.io and urgently need for this new permission type to be implemented in order to let mods and admins delete troll and spam posts after the time set for message deleting has run out.

@phutchins
Copy link
Contributor

Yeah, this is really biting us right now. Almost bad enough to make this a non viable solution.

I would go as far as to say that this is a bug as an administrator should be able to delete any message and requiring an admin (or sysadmin) to delete a message via the DB isn't super reasonable...

@phutchins
Copy link
Contributor

@marceloschmidt I wouldn't mind building a PR for this to get it done. I'm not familiar with the codebase yet so some clarification and confirmation on how we should do this would be helpful if you have the time.

From a quick look, looks like I'd need to do the following...

  • Add setting to allow owners to be able to delete messages in room (startup.js)
  • Add setting to allow moderator to be able to delete message in room (startup.js)
  • Add a bypass to blockDeleteInMinutes on the client and server for admins (deleteMessage.js)
  • Add check for allow moderators and owners to be able to delete a message in room
  • Update rocketchat-ui and rocketchat-ui-message to show delete button when appropriate which would match the settings mentioned above (chatMessage.coffee & message.coffee)

Anything that I'm missing?

@marceloschmidt
Copy link
Member

It seems to me you got it all covered. Thank you very much in advance for the PR.

@phutchins
Copy link
Contributor

@marceloschmidt awesome, thanks for the confirmation. I'll aim to get something in here in the next week or so.

@phutchins
Copy link
Contributor

@marceloschmidt here's a PR with the feature added...

#6919

@engelgabriel engelgabriel added this to the 0.57.0 milestone May 10, 2017
@phutchins
Copy link
Contributor

I think we can close this as my PR was merged and will be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants