* Null checked org invite collections
* Null checked permissions on org invite
* Gave a static seat count to org invite fixture
* Null checked the right way
* Implemented Custom role and permissions
* Converted permissions columns to a json blob
* Code review fixes for Permissions
* sql build fix
* Update Permissions.cs
* formatting
* Update IOrganizationService.cs
* reworked a conditional
* built out tests for relevant organization service methods
* removed unused usings
* fixed a broken test and a bad empty string init
* removed 'Attribute' from some attribute instances
* Return revised ciphers on restore api call
* Return restored date from restore sproc
* Test Restore updates passed in ciphers
This is necessary for CipherController to appropriately return the
up-to-date ciphers without an extra db call to read them.
* Add missing SELECT
* Sorted usings
* Added CoreHelpersTests
* Added CloneObject test
* Added comments to SelfHostedAttributeTests
* Changed private variable declaration to be inline with the rest of the project
* Changed to SUT naming scheme
* Scaffolded AppleIapServiceTests
* Scaffolded I18nServiceTests.cs
* Scaffolded I18nViewLocalizerTests
* Scaffolded LocalSendStorageServiceTests
* Added tests to ReadableBytesSize_Success
* Add more CleanCertificateThumbprint tests
* Added more tests for the ExtendQuery method
* Removed AppleIapServiceTests
* Removed I18nServiceTests
* Removed I18nViewLocalizerTests
* Removed LocalSendStorageServiceTests
* Converted Batch_Success to theory with InlineData
* Simplified Batch_Success so there is less branching and more accuracy
* Switched to using size variable to format readable bytes for any number lower than 1024
* Fixed test data to work in all locales
* Add last updated validation to cipher replacements
* Add AutoFixture scaffolding.
AutoDataAttributes and ICustomizations are meant to automatically
produce valid test input. Examples are the Cipher customizations,
which enforce the model's mutual exclusivity of UserId and
OrganizationId.
FixtureExtensions create a fluent way to generate SUTs. We currently
use parameter injection to fascilitate service testing, which is nicely
handled by AutoNSubstitute. However, in order to gain access to the
substitutions, we need to Freeze them onto the Fixture. The For fluent
method allows specifying a Freeze to a specific type's constructor and
optionally to a parameter name in that constructor.
* Unit tests for single Cipher update version checks
* Fix test runner
Test runner requires Microsoft.NET.Test.Sdk
* Move to provider model for SUT generation
This model differs from previous in that you no longer need to specify
which dependencies you would like access to. Instead, all are
remembered and can be queried through the sutProvider.
* User cipher provided by Put method reads
Every put method already reads all relevant ciphers from database,
there's no need to re-read them.
JSON serialization of datetimes seems to leave truncate at second
precision. Verify last known date time is within one second rather than
exact.
* validate revision date for share many requests
* Update build script to use Github environment path
Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
* added column ApiKey to dbo.User
* added dbo.User.ApiKey to User_Update
* added dbo.User.ApiKey to User_Create
* wrote migration script for implementing dbo.User.ApiKey
* Added ApiKey prop to the User table model
* Created AccountsController method for getting a user's API Key
* Created AccountsController method for rotating a user API key
* Added support to ApiClient for passed-through ClientSecrets when the request comes from the cli
* Added a new conditional to ClientStore to account for user API keys
* Wrote unit tests for new user API Key methods
* Added a refresh of dbo.UserView to new migration script for ApiKey
* Let client_credentials grants into the custom token logic
* Cleanup for ApiKey auth in the CLI feature
* Created user API key on registration
* Removed uneeded code for user API keys
* Changed a .Contains() to a .StartsWith() in ClientStore
* Changed index that an array is searched on
* Added more claims to the user apikey clients
* Moved some claim finding logic to a helper method
* Initial commit of accept user during set password flow
* changed new org user from accepted to invited // moved another check to token accept function
* Revised some white space // Moved business logic to UserService
* Fixed UserServiceTest
* Removed some white-space
* Removed more white-space
* Final white-space issues
* facilitate linking/unlinking existing users from an sso enabled org
* added user_identifier to identity methods for sso
* moved sso user delete method to account controller
* fixed a broken test
* Update AccountsController.cs
* facilitate linking/unlinking existing users from an sso enabled org
* added user_identifier to identity methods for sso
* moved sso user delete method to account controller
* fixed a broken test
* added a token to the existing user sso link flow
* added a token to the existing user sso link flow
* fixed a typo
* added an event log for unlink ssoUser records
* fixed a merge issue
* fixed a busted test
* fixed a busted test
* ran a formatter over everything & changed .vscode settings in .gitignore
* chagned a variable to use string interpolation
* removed a blank line
* Changed TokenPurpose enum to a static class of strings
* code review cleanups
* formatting fix
* Changed parameters & logging for delete sso user
* changed th method used to get organization user for deleting sso user records
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Following the paradigms illustrated in "Working Effectively with Legacy
Code", this commit introduces at least one test for each service class
implementation. This test is a simple construction test -- we just
create each service and assert that it exists. Each test suite includes
a comment instructing the developer who comes next to remove the
constructor test. We don't want to keep these tests as the codebase
matures, as they aren't useful in the longterm. They only prove that we
have that class under test.
Where test suites failed to construct their associated classes, we skip
the test but leave behind the implementation. This is by design, so that
as the constructors for those classes change, we are forced to keep the
test suite current by leaning on the compiler.