Compare commits

..

4 Commits

6 changed files with 28 additions and 6 deletions
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.13.13](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.13.12...@standardnotes/home-server@1.13.13) (2023-07-26)
**Note:** Version bump only for package @standardnotes/home-server
## [1.13.12](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.13.11...@standardnotes/home-server@1.13.12) (2023-07-26)
**Note:** Version bump only for package @standardnotes/home-server
## [1.13.11](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.13.10...@standardnotes/home-server@1.13.11) (2023-07-26)
**Note:** Version bump only for package @standardnotes/home-server
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/home-server",
"version": "1.13.11",
"version": "1.13.13",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
+12
View File
@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.70.5](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.70.4...@standardnotes/syncing-server@1.70.5) (2023-07-26)
### Bug Fixes
* **syncing-server:** uuid comparison when removing user ([886ccf8](https://github.com/standardnotes/syncing-server-js/commit/886ccf84c1f3b9309ce7d01354ca815af1424b72))
## [1.70.4](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.70.3...@standardnotes/syncing-server@1.70.4) (2023-07-26)
### Bug Fixes
* **syncing-serve:** removing other users from shared vault ([6b2389c](https://github.com/standardnotes/syncing-server-js/commit/6b2389cdc3da6d522f9ce0ba3ddff3ef1e99674f))
## [1.70.3](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.70.2...@standardnotes/syncing-server@1.70.3) (2023-07-26)
### Bug Fixes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/syncing-server",
"version": "1.70.3",
"version": "1.70.5",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
@@ -45,12 +45,13 @@ describe('RemoveUserFromSharedVault', () => {
it('should remove user from shared vault', async () => {
const useCase = createUseCase()
await useCase.execute({
const result = await useCase.execute({
originatorUuid: '00000000-0000-0000-0000-000000000000',
sharedVaultUuid: '00000000-0000-0000-0000-000000000000',
userUuid: '00000000-0000-0000-0000-000000000001',
})
expect(result.isFailed()).toBeFalsy()
expect(sharedVaultUserRepository.remove).toHaveBeenCalledWith(sharedVaultUser)
})
@@ -99,7 +100,7 @@ describe('RemoveUserFromSharedVault', () => {
})
expect(result.isFailed()).toBe(true)
expect(result.getError()).toBe('Only owner can remove users from shared vault')
expect(result.getError()).toBe('Only owner can remove other users from shared vault')
})
it('should remove shared vault user if user is owner and is being force removed', async () => {
@@ -37,8 +37,9 @@ export class RemoveUserFromSharedVault implements UseCaseInterface<void> {
}
const originatorIsOwner = sharedVault.props.userUuid.equals(originatorUuid)
if (!originatorIsOwner) {
return Result.fail('Only owner can remove users from shared vault')
const removingSomeoneElseWhenNotOwner = !originatorIsOwner && !userUuid.equals(originatorUuid)
if (removingSomeoneElseWhenNotOwner) {
return Result.fail('Only owner can remove other users from shared vault')
}
const removingOwner = sharedVault.props.userUuid.equals(userUuid)