chore(server): Use access core for person permissions (#4138)

* use access core for all person methods

* minor fixes, feedback

* reorder assignments

* remove unnecessary permission requirement

* unify naming of tests

* reorder variables
This commit is contained in:
Daniel Dietzler 2023-09-18 23:22:44 +02:00 committed by GitHub
parent dda735ec51
commit 1a633f3fca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 171 additions and 29 deletions

View file

@ -4,6 +4,7 @@ export interface IAccessRepositoryMock {
asset: jest.Mocked<IAccessRepository['asset']>;
album: jest.Mocked<IAccessRepository['album']>;
library: jest.Mocked<IAccessRepository['library']>;
person: jest.Mocked<IAccessRepository['person']>;
}
export const newAccessRepositoryMock = (): IAccessRepositoryMock => {
@ -24,5 +25,9 @@ export const newAccessRepositoryMock = (): IAccessRepositoryMock => {
library: {
hasPartnerAccess: jest.fn(),
},
person: {
hasOwnerAccess: jest.fn(),
},
};
};