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-12758] Add managed status to OrganizationUserDetailsResponseModel and OrganizationUserUserDetailsResponse #4918

Conversation

r-tome
Copy link
Contributor

@r-tome r-tome commented Oct 21, 2024

🎟️ Tracking

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

📔 Objective

Add the ManagedByOrganization boolean property to OrganizationUserDetailsResponseModel and OrganizationUserUserDetailsResponseModel. This property indicates whether a user is managed by an organization, enabling certain actions in the admin console that are exclusive to managed users (e.g., deleting an account).

⏰ 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

…gement status of organization users in details endpoint
@r-tome r-tome requested a review from eliykat October 21, 2024 14:53
@r-tome r-tome marked this pull request as ready for review October 21, 2024 14:53
@r-tome r-tome requested a review from a team as a code owner October 21, 2024 14:53
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 84.37500% with 5 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@d38c489). Learn more about missing BASE report.
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...Console/Controllers/OrganizationUsersController.cs 90.90% 1 Missing and 1 partial ⚠️
...Console/Repositories/OrganizationUserRepository.cs 0.00% 2 Missing ⚠️
...nse/Organizations/OrganizationUserResponseModel.cs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4918   +/-   ##
=======================================
  Coverage        ?   42.33%           
=======================================
  Files           ?     1384           
  Lines           ?    64582           
  Branches        ?     5934           
=======================================
  Hits            ?    27342           
  Misses          ?    36009           
  Partials        ?     1231           

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

@r-tome r-tome marked this pull request as draft October 21, 2024 15:03
…gement status of an individual user in details endpoint
@r-tome r-tome changed the title [PM-12758] Add managed status to OrganizationUserUserDetailsResponse [PM-12758] Add managed status to OrganizationUserDetailsResponseModel and OrganizationUserUserDetailsResponse Oct 21, 2024
@r-tome r-tome marked this pull request as ready for review October 21, 2024 15:26
Copy link
Contributor

github-actions bot commented Oct 21, 2024

Logo
Checkmarx One – Scan Summary & Details078e8893-0a83-4117-b432-99c0dbc56b82

Fixed Issues

Severity Issue Source File / Package
MEDIUM CSRF /src/Admin/AdminConsole/Controllers/OrganizationsController.cs: 351
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/MembersController.cs: 96
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 227
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 100
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 334
MEDIUM CSRF /src/Admin/AdminConsole/Controllers/OrganizationsController.cs: 351
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 351
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/MembersController.cs: 72
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/PoliciesController.cs: 42
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/PoliciesController.cs: 62
MEDIUM CSRF /src/Api/AdminConsole/Controllers/PoliciesController.cs: 58
MEDIUM CSRF /src/Api/AdminConsole/Controllers/PoliciesController.cs: 75
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationUsersController.cs: 253
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 217
MEDIUM Privacy_Violation /src/Core/Auth/Services/Implementations/AuthRequestService.cs: 208
MEDIUM Privacy_Violation /src/Core/Auth/Services/Implementations/AuthRequestService.cs: 217
LOW Log_Forging /src/Api/Vault/Controllers/CiphersController.cs: 170

@r-tome r-tome requested a review from eliykat October 23, 2024 13:16
@r-tome r-tome merged commit a128cf1 into main Oct 24, 2024
54 checks passed
@r-tome r-tome deleted the ac/pm-12758/add-managed-status-to-organizationuseruserdetailsresponse branch October 24, 2024 14:39
cyprain-okeke pushed a commit that referenced this pull request Oct 30, 2024
… and OrganizationUserUserDetailsResponse (#4918)

* Refactor OrganizationUsersController.Get to include organization management status of organization users in details endpoint

* Refactor OrganizationUsersController.Get to include organization management status of an individual user in details endpoint

* Remove redundant .ToDictionary()

* Simpify the property xmldoc

* Name tuple variables in OrganizationUsersController.Get

* Name returned tuple objects in GetDetailsByIdWithCollectionsAsync method in OrganizationUserRepository

* Refactor MembersController.Get to destructure tuple returned by GetDetailsByIdWithCollectionsAsync

* Add test for OrganizationUsersController.Get to assert ManagedByOrganization is set accordingly
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