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

feat(server): allow oauth claim to set 0 for no quota #7581

Conversation

samholton
Copy link
Contributor

@jrasm91 thanks for all the help on #7548 - Do we want to support the use case of having a default quota set but setting it to unlimited for specific users via the claim? I was sticking with 0 to match the UI and default quota language.

Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, this allows 0 in the claim. Sounds good.

@@ -543,7 +543,7 @@ describe('AuthService', () => {
loginResponseStub.user1oauth,
);

expect(userMock.create).toHaveBeenCalledWith(userDto.userWithDefaultStorageQuota);
expect(userMock.create).toHaveBeenCalledWith(userDto.userWithUnsetQuotaClaim);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to remove these user objects and just assert it matches an object containing the right quota value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I can make that change

@alextran1502 alextran1502 merged commit f03381a into immich-app:main Mar 2, 2024
24 checks passed
@samholton samholton deleted the feature/allow-oauth-storage-claim-to-set-unlimited branch March 2, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants