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

[PM-12922] Disable delete if user can't manage collection #4179

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SaintPatrck
Copy link
Contributor

@SaintPatrck SaintPatrck commented Oct 28, 2024

🎟️ Tracking

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

📔 Objective

Disables the delete button for items in collections where the user does not have "manage" permission.

This change ensures that users cannot delete items from collections they are not authorized to manage. It updates the UI to reflect the user's permissions and prevents accidental or unauthorized deletions.

Depends on #4169

📸 Screenshots

Coming soon!

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation 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

@SaintPatrck SaintPatrck force-pushed the PM-12922/delete-collection-permission branch from b384ccd to 60b1167 Compare October 29, 2024 14:22
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 51.35135% with 18 lines in your changes missing coverage. Please review.

Project coverage is 89.06%. Comparing base (aa38da6) to head (0a965c8).

Files with missing lines Patch % Lines
.../ui/vault/feature/addedit/VaultAddEditViewModel.kt 40.00% 1 Missing and 8 partials ⚠️
...warden/ui/vault/feature/item/VaultItemViewModel.kt 56.25% 0 Missing and 7 partials ⚠️
...den/ui/vault/feature/addedit/VaultAddEditScreen.kt 50.00% 0 Missing and 1 partial ⚠️
...bitwarden/ui/vault/feature/item/VaultItemScreen.kt 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           PM-13900/update-bw-sdk    #4179      +/-   ##
==========================================================
- Coverage                   89.09%   89.06%   -0.04%     
==========================================================
  Files                         445      445              
  Lines                       38650    38683      +33     
  Branches                     5406     5424      +18     
==========================================================
+ Hits                        34435    34452      +17     
- Misses                       2343     2344       +1     
- Partials                     1872     1887      +15     

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

@SaintPatrck SaintPatrck force-pushed the PM-12922/delete-collection-permission branch 3 times, most recently from 711a7fa to ccdfa02 Compare October 29, 2024 19:07
@SaintPatrck SaintPatrck changed the base branch from main to PM-13900/update-bw-sdk October 29, 2024 19:09
@SaintPatrck SaintPatrck force-pushed the PM-12922/delete-collection-permission branch from ccdfa02 to 0a965c8 Compare October 29, 2024 19:11
@SaintPatrck SaintPatrck marked this pull request as ready for review October 29, 2024 19:16
@SaintPatrck SaintPatrck force-pushed the PM-12922/delete-collection-permission branch 3 times, most recently from 17d36f0 to 9850607 Compare October 29, 2024 22:25
Base automatically changed from PM-13900/update-bw-sdk to main October 30, 2024 16:20
@SaintPatrck SaintPatrck dismissed david-livefront’s stale review October 30, 2024 16:20

The base branch was changed.

@SaintPatrck SaintPatrck force-pushed the PM-12922/delete-collection-permission branch from 9850607 to cfc666d Compare October 30, 2024 16:29
@SaintPatrck SaintPatrck added this pull request to the merge queue Oct 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 30, 2024
@SaintPatrck SaintPatrck force-pushed the PM-12922/delete-collection-permission branch from cfc666d to da59d05 Compare October 30, 2024 20:03
@SaintPatrck SaintPatrck added this pull request to the merge queue Oct 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Oct 30, 2024
@SaintPatrck SaintPatrck force-pushed the PM-12922/delete-collection-permission branch from da59d05 to 4d2f1c2 Compare October 31, 2024 14:24
Disables the delete button for items in collections where the user does not have "manage" permission.

This change ensures that users cannot delete items from collections they are not authorized to manage. It updates the UI to reflect the user's permissions and prevents accidental or unauthorized deletions.
@SaintPatrck SaintPatrck added this pull request to the merge queue Oct 31, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 31, 2024
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.

2 participants