* Add new properties to organization
* Add new properties to organization
* Create migration
* Add the columns to the view
* Fix the syntax error
* Change the namespaces
* Remove the comma on the stripe file
* Remove the nulls
* Resolving the PR comments
* Add a refresh for OrganizationView
* Remove the True default values
* Resolve the comments
* [AC-1163] Update ViewAllCollections method to include check for ManagerUsers permission
Users with ManagerUsers permission need to be able to view all collections in order to assign them to other users.
* [AC-1163] Revert change to CurrentContext
* [AC-1163] Add check for ManageUsers to list collections endpoint
* [PM-1270] Updated PolicyService to throw an exception in case TDE is enabled and the user is trying to turn off the master password reset policy or tries to remove auto-enrollment
* [PM-1270] Added unit tests around the checks for turning off the master password reset policy or removing auto-enrollment
* [PM-1270] Fixed existing unit test SaveAsync_NewPolicy_Created
* [PM-1270] Removed unused method mock on unit test
* Move to access query for project commands
* Swap to hasAccess method per action
* Swap to authorization handler pattern
* Move ProjectOperationRequirement to Core
* Add default throw + tests
* Extract authorization out of commands
* Unit tests for authorization handler
* Formatting
* Swap to reflection for testing switch
* Swap to check read & reflections in test
* fix wording on exception
* Refactor GetAccessClient into its own query
* Use accessClientQuery in project handler
* [AC-1265] Allow users with custom import/export permission to get organization ciphers
* [AC-1104] Fix to allow custom users with import/export permission to access all collections/ciphers in their organization
* [AC-1104] Remove redundant OrganizationAdmin checks
* Making changes for the help link
* Making changes for the PR comment
* default value in the view model itself
* Adjusting the image position
* Add more information to the plain text
* Move keys into FreshDeskSettings class
* Add configurable custom fields for user and org
In FreshDesk we currently use the custom fields `cf_user` and `cf_org`.
- For the US instance these will be set to those values.
- For the EU instance these will likely be configured to `cf_user_eu` and `cf_org_eu`
* Fix file encoding
* Add region to notes
* Use customizable org field value in condition check
* [AC-621] Added possibility of adding users through SCIM to an Organization without a confirmed Owner
* [AC-621] Passing EventSystemUser argument for HasConfirmedOwnersExceptAsync in user delete actions by SCIM
* [AC-624] Removed EventSystemUser parameter from IOrganizationService.HasConfirmedOwnersExceptAsync
* [AC-621] Added IProviderUserRepository.GetManyOrganizationDetailsByOrganizationAsync
* [AC-621] Updated OrganizationService.HasConfirmedOwnersExceptAsync to use IProviderUserRepository.GetManyOrganizationDetailsByOrganizationAsync to check for any confirmed provider users
* [AC-621] Removed unused EventSystemUser parameters
* [AC-621] Refactored ProviderUserRepository.GetManyByOrganizationAsync to return ProviderUser objects
* [AC-621] Removed default parameter value for Status
* [PM-1879] Replaced JsonSerializer.Serialize with CoreHelpers.ClassToJsonData
* [PM-1879] Changed OrganizationService.SaveUserAsync to check Custom permissions
* [PM-1879] Added unit tests for saving Custom permissions using a Custom user
* [PM-1879] Added method OrganizationUser.GetPermissions to deserialize the Permissions property
* [PM-1879] Refactored ValidateCustomPermissionsGrant to return bool
* [PM-1879] Added unit test SaveUser_WithCustomPermission_WhenUpgradingToAdmin_Throws
* Extend ReferenceEvents
Add ClientId and ClientVersion
Modify all callsites to pass in currentContext if available to fill ClientId and ClientVersion
* Extend ReferenceEvent to save if Send has notes
* [AC-358] Add constant for grace period length
* [AC-358] Add SubscriptionExpiration to OrganizationLicense.cs and increment Current_License_File_Version
* [AC-358] Update org subscription response model
- Add new SelfHostSubscriptionExpiration field that does not include a grace period
- Add optional License argument to constructor for self host responses
- Use the License, if available, to populate the expiration/subscription expiration fields
- Maintain backwards compatability by falling back to organization expiration date
* [AC-358] Read organization license file for self hosted subscription response
* [AC-358] Decrement current license file version and add comment documenting why
* [AC-358] Clarify name for new expiration without grace period field
* [EC-787] Add new stored procedure OrganizationUser_ReadByUserIdWithPolicyDetails
* [EC-787] Add new method IOrganizationUserRepository.GetByUserIdWithPolicyDetailsAsync
* [EC-787] Add OrganizationUserPolicyDetails to represent policies applicable to a specific user
* [EC-787] Add method IPolicyService.GetPoliciesApplicableToUser to filter the obtained policy data
* [EC-787] Returning PolicyData on stored procedures
* [EC-787] Changed GetPoliciesApplicableToUserAsync to return ICollection
* [EC-787] Switched all usings of IPolicyRepository.GetManyByTypeApplicableToUserIdAsync to IPolicyService.GetPoliciesApplicableToUserAsync
* [EC-787] Removed policy logic from BaseRequestValidator and added usage of IPolicyService.GetPoliciesApplicableToUserAsync
* [EC-787] Added unit tests for IPolicyService.GetPoliciesApplicableToUserAsync
* [EC-787] Added unit tests for OrganizationUserRepository.GetByUserIdWithPolicyDetailsAsync
* [EC-787] Changed integration test to check for single result
* [EC-787] Marked IPolicyRepository methods GetManyByTypeApplicableToUserIdAsync and GetCountByTypeApplicableToUserIdAsync as obsolete
* [EC-787] Returning OrganizationUserId on OrganizationUser_ReadByUserIdWithPolicyDetails
* [EC-787] Remove deprecated stored procedures Policy_CountByTypeApplicableToUser, Policy_ReadByTypeApplicableToUser and function PolicyApplicableToUser
* [EC-787] Added method IPolicyService.AnyPoliciesApplicableToUserAsync
* [EC-787] Removed 'OrganizationUserType' parameter from queries
* [EC-787] Formatted OrganizationUserPolicyDetailsCompare
* [EC-787] Renamed SQL migration files
* [EC-787] Changed OrganizationUser_ReadByUserIdWithPolicyDetails to return Permissions json
* [EC-787] Refactored excluded user types for each Policy
* [EC-787] Updated dates on dbo_future files
* [EC-787] Remove dbo_future files from sql proj
* [EC-787] Added parameter PolicyType to IOrganizationUserRepository.GetByUserIdWithPolicyDetailsAsync
* [EC-787] Rewrote OrganizationUser_ReadByUserIdWithPolicyDetails and added parameter for PolicyType
* Update util/Migrator/DbScripts/2023-03-10_00_OrganizationUserReadByUserIdWithPolicyDetails.sql
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-1145] Add TDE feature flag
* [AC-1145] Update .gitignore to ignore flags.json in the Api project
* [AC-1145] Introduce MemberDecryptionType property on SsoConfigurationData
* [AC-1145] Add MemberDecryptionType to the SsoConfigurationDataRequest model
* [AC-1145] Automatically enable password reset policy on TDE selection
* [AC-1145] Remove references to obsolete KeyConnectorEnabled field
* [AC-1145] Formatting
* [AC-1145] Update XML doc reference to MemberDecryptionType
* Refactor AuthRequest Logic into Service
* Add Tests & Run Formatting
* Register Service
* Add Tests From PR Feedback
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
---------
Co-authored-by: Jared Snider <jsnider@bitwarden.com>
* Auth/pm-48 (#2680)
* PM-48 - add user's role as a claim and establish access control service
* PM-48 - remove function unrelated to the role claim
* PM-48 - fix whitespace issues
* PM-48 - move registration of CustomClaimsPrincipalFactory, replace role claim type string with constant, streamline code that retrieves the user's role
* Auth/pm-47 (#2699)
* PM-48 - add user's role as a claim and establish access control service
* PM-48 - remove function unrelated to the role claim
* PM-48 - fix whitespace issues
* PM-47 - add list of permission enums, role:permissions mapping, and function that determines if the logged in user has the given permission
* PM-47 - remove unneeded service registration, set role to lowercase
* PM-47 - fix code style issues
* PM-46 - create permission filter attribute (#2753)
* Auth/pm-54 add rbac for users (#2758)
* PM-54 - add permission gates to User elements
* PM-54 - fix formatting
* PM-54 - remove unused function
* PM-54 - fix variable reference, add permission to billing role
* PM-54 - handle Upgrade Premium button functionality and fix spelling
* PM-54 - change permission name to be more accurate
* PM-49 - update role retrieval (#2779)
* Auth/[PM-50] add rbac for logs (#2782)
* PM-50 - add rbac for logs
* PM-50 - remove unnecessary action filter
* PM-51 - add RBAC for tools (#2799)
* Auth/[pm-52] add rbac providers (#2818)
* PM-52 add rbac for providers
* PM-52 - update redirect action
* PM-52 - add back edit functionality and permission
* PM-52 - reverse changes around removing edit functionality
* PM-52 - moved permission check to variable assignement
* PM-53 - add rbac for organizations (#2798)
* PM-52 - add missed permission to billing role (#2836)
* Fixed merge conflicts.
* [PM-1846] Updates to add RBAC back after merge conflicts (#2870)
* Updates to add RBAC to changes from reseller.
* Added back checks for delete and initiating a trial.
* Removed extraneous Razor tag.
---------
Co-authored-by: dgoodman-bw <109169446+dgoodman-bw@users.noreply.github.com>
Co-authored-by: Danielle Goodman <dgoodman@bitwarden.com>
Co-authored-by: Jacob Fink <jfink@bitwarden.com>