Skip to content

[PM-21577] Handle organization limitItemDeletion from sync response. #5244

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

Merged
merged 4 commits into from
May 22, 2025

Conversation

andrebispo5
Copy link
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-21577

📔 Objective

When organization Limit item deletion to Members with Manage permission is off, users with Can Edit permission or Can edit, hide password permission should be able to see the delete button in the menu.

📸 Screenshots

Soon™

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
Contributor

github-actions bot commented May 21, 2025

Logo
Checkmarx One – Scan Summary & Details3bab9eb4-5f8d-48af-a63d-a27bd9d76153

Great job, no security vulnerabilities found in this Pull Request

@andrebispo5 andrebispo5 marked this pull request as ready for review May 22, 2025 15:10
Copy link

codecov bot commented May 22, 2025

Codecov Report

Attention: Patch coverage is 75.86207% with 7 lines in your changes missing coverage. Please review.

Project coverage is 82.55%. Comparing base (c9d4d35) to head (60d7bcc).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...warden/ui/vault/feature/item/VaultItemViewModel.kt 44.44% 0 Missing and 5 partials ⚠️
.../ui/vault/feature/addedit/VaultAddEditViewModel.kt 90.00% 0 Missing and 1 partial ⚠️
.../ui/vault/feature/util/CollectionViewExtensions.kt 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5244      +/-   ##
==========================================
+ Coverage   81.65%   82.55%   +0.89%     
==========================================
  Files         874      694     -180     
  Lines       57412    51648    -5764     
  Branches     7299     6950     -349     
==========================================
- Hits        46882    42637    -4245     
+ Misses       8029     6702    -1327     
+ Partials     2501     2309     -192     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -347,6 +347,9 @@ data class SyncResponseJson(

@SerialName("userIsClaimedByOrganization")
val userIsClaimedByOrganization: Boolean = false,

@SerialName("limitItemDeletion")
val limitItemDeletion: Boolean = false,
Copy link
Collaborator

@david-livefront david-livefront May 22, 2025

Choose a reason for hiding this comment

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

Can you make sure to add a doc for this and add an override for the test fixture as well

@@ -12,6 +12,8 @@ import com.bitwarden.network.model.OrganizationType
* @property shouldUseKeyConnector Indicates that the organization uses a key connector.
* @property role The user's role in the organization.
* @property keyConnectorUrl The key connector domain (if applicable).
* @property userIsClaimedByOrganization Indicates that the user is claimed by the organization.
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -93,6 +93,7 @@ fun createMockOrganization(
familySponsorshipValidUntil: ZonedDateTime? = ZonedDateTime.parse("2023-10-27T12:00:00Z"),
status: OrganizationStatusType = OrganizationStatusType.ACCEPTED,
userIsClaimedByOrganization: Boolean = false,
limitItemDeletion: Boolean = false,
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@andrebispo5 andrebispo5 added this pull request to the merge queue May 22, 2025
Merged via the queue into main with commit 6d976be May 22, 2025
9 checks passed
@andrebispo5 andrebispo5 deleted the pm-21577/limit-item-deletion branch May 22, 2025 22:39
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.

3 participants