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

Fixed wrong deletion logic from the DB #637

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

TSlashDreamy
Copy link
Contributor

@TSlashDreamy TSlashDreamy commented Nov 16, 2023

user_1, user_2

{
  "_id": {
    "$oid": "65568c34d556695822907892"
  },
  "text": "Hi!",
  "clearedFor": [user_1],
}

Previously:
user_1 could delete the message entirely from DB even if he is in clearedFor field (user_2 could do this too)

Now:
Only user_2 can delete the message entirely from DB (we need to have user_1 in clearedFor field for this)

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@TSlashDreamy TSlashDreamy merged commit 8c8a7c4 into develop Nov 17, 2023
3 of 4 checks passed
@TSlashDreamy TSlashDreamy deleted the hotfix/622/delete-logic branch November 17, 2023 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants