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

Dovecot Lua auth: Various fixes #681

Merged
merged 2 commits into from
Dec 3, 2024
Merged

Dovecot Lua auth: Various fixes #681

merged 2 commits into from
Dec 3, 2024

Conversation

y3n4
Copy link
Contributor

@y3n4 y3n4 commented Dec 1, 2024

No description provided.

@y3n4 y3n4 changed the title Dovecot Lua auth: Fix quota attribute Dovecot Lua auth: Various fixes Dec 2, 2024
@y3n4 y3n4 marked this pull request as ready for review December 2, 2024 15:23
Copy link
Contributor

@doobry-systemli doobry-systemli left a comment

Choose a reason for hiding this comment

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

Code changes look good to me. I didn't test.

@@ -116,12 +121,16 @@ public function authenticate(
$mailCryptReported = 0;
}

$customQuota = $user->getQuota();
$customQuotaString = $customQuota !== null ? sprintf('*:storage=%dM', $customQuota) : "";
Copy link
Member

Choose a reason for hiding this comment

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

This code duplication should be extracted to an internal function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed that the code duplication wasn't necessary in the first place and removed it. Returning the quota only for the user lookup is sufficient

Copy link

sonarcloud bot commented Dec 2, 2024

@y3n4 y3n4 merged commit 21d767f into main Dec 3, 2024
11 checks passed
@y3n4 y3n4 deleted the lua-dovecot-fix-quota branch December 3, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants