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] Permission to bypass message editing and removing limits #27644

Merged
merged 29 commits into from Feb 9, 2023

Conversation

LucianoPierdona
Copy link
Contributor

@LucianoPierdona LucianoPierdona commented Dec 26, 2022

Proposed changes (including videos or screenshots)

This PR adds a new permission called bypass-time-limit-edit-and-delete, to bypass the time limit when editing or deleting a message, the purpose of this PR is to remove the limitation for bots that cannot change the message after the specified time.

Issue(s)

Steps to test or reproduce

  • Add a Jira integration with RC such that it creates threads in RC, and when the status of the Jira task is updated, the first message in the thread in RC gets updated via REST API to correspond to the Jira status.
  • In RC, go to Administration -> Message -> Block Message Editing After X Minutes and set the value to 10
  • Update the status of the Jira task after 10 minutes

Further comments

TC-329

@LucianoPierdona LucianoPierdona self-assigned this Dec 26, 2022
@LucianoPierdona LucianoPierdona changed the title [FEAT] Bypass Time limits permission Chore: Bypass Time limits permission Dec 26, 2022
@LucianoPierdona LucianoPierdona changed the title Chore: Bypass Time limits permission [NEW] Bypass Time limits permission Dec 26, 2022
@codecov
Copy link

codecov bot commented Dec 26, 2022

Codecov Report

Merging #27644 (9bc72d6) into develop (e86f1af) will increase coverage by 0.07%.
The diff coverage is 57.14%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #27644      +/-   ##
===========================================
+ Coverage    41.60%   41.67%   +0.07%     
===========================================
  Files          849      849              
  Lines        17556    17560       +4     
  Branches      2087     2087              
===========================================
+ Hits          7305     7319      +14     
+ Misses        9979     9967      -12     
- Partials       272      274       +2     
Flag Coverage Δ
e2e 41.67% <57.14%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@matheusbsilva137 matheusbsilva137 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The messageActionDefault.ts file and the canDeleteMessage function in the apps/meteor/client/lib/chats/data.ts file should also be updated so that the action buttons are displayed in the UI when a user has the bypass permission.

…ns.ts

Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>
@LucianoPierdona LucianoPierdona marked this pull request as ready for review December 28, 2022 16:29
@LucianoPierdona LucianoPierdona requested a review from a team as a code owner December 28, 2022 16:29
apps/meteor/client/lib/chats/data.ts Outdated Show resolved Hide resolved
apps/meteor/client/lib/chats/data.ts Outdated Show resolved Hide resolved
@LucianoPierdona LucianoPierdona changed the title [NEW] Bypass Time limits permission [NEW] Permission to bypass message editing and removing limits Jan 2, 2023
@LucianoPierdona LucianoPierdona requested a review from a team as a code owner January 3, 2023 14:37
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: conflict labels Feb 8, 2023
…imits-permission

# Conflicts:
#	apps/meteor/server/startup/migrations/v284.ts
rodrigok
rodrigok previously approved these changes Feb 9, 2023
@rodrigok
Copy link
Member

rodrigok commented Feb 9, 2023

@hugocostadev could you review this again?

hugocostadev
hugocostadev previously approved these changes Feb 9, 2023
@hugocostadev hugocostadev dismissed stale reviews from rodrigok and themself via f5abd9a February 9, 2023 17:18
@kodiakhq kodiakhq bot merged commit d49c975 into develop Feb 9, 2023
@kodiakhq kodiakhq bot deleted the feat/bypass-time-limits-permission branch February 9, 2023 23:41
gabriellsh added a commit that referenced this pull request Feb 13, 2023
…e/wizard

* 'develop' of github.com:RocketChat/Rocket.Chat:
  [BREAK] Unify monolith and microservices intercommunication on same technology and limit to Enterprise only (#27969)
  [NEW] Emojis rendering properly on quote message previews (#27972)
  Chore: Wait message to not be Busy (#28000)
  Chore: e2e changes tests (#27987)
  [IMPROVE] Audit (#27994)
  [IMPROVE] Registration Experience (#27820)
  [BREAK][ENTERPRISE] Limit presence statuses to 200 concurrent users when running monolith to keep performance (#27854)
  [BREAK] Removed deprecated settings for Legacy Messages, Marked, Snippet Messages, Autolinker and IssueLinks (#27902)
  [NEW] Permission to bypass message editing and removing limits (#27644)
  [FIX] Video Conf Message Blocks not always updating when running on micro services (#27764)
  Chore: Set missing colors (#27817)
  Fix CI
  Chore: undo busy selector
  [BREAK] Remove message view mode from User Preferences (#27867)
  Chore: Aria busy indicators (#27978)
  Chore: Refactor Composer Dropdown (#27931)
  Chore: Added Enterprise Options to Login customization (#27855)
  [FIX] Ignored messages reactivity (#27279)
  [BREAK] [NEW] Custom roles upsell modal (#27707)
@sampaiodiego sampaiodiego mentioned this pull request Feb 17, 2023
@sampaiodiego sampaiodiego mentioned this pull request Mar 9, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants