Fix tenant principal limits (fixes #810)

This commit is contained in:
mdecimus
2024-09-27 15:16:35 +02:00
parent 6d2c1521c5
commit 7a8edb67bb
2 changed files with 5 additions and 2 deletions

View File

@@ -749,7 +749,10 @@ impl Default for SessionConfig {
),
mechanisms: IfBlock::new::<Mechanism>(
"session.auth.mechanisms",
[("local_port != 25 && is_tls", "[plain, login, oauthbearer]")],
[
("local_port != 25 && is_tls", "[plain, login, oauthbearer]"),
("local_port != 25", "[oauthbearer]"),
],
"false",
),
require: IfBlock::new::<()>(

View File

@@ -923,7 +923,7 @@ impl ManageDirectory for Store {
PrincipalField::Quota,
PrincipalValue::IntegerList(quotas),
) if matches!(principal.inner.typ, Type::Tenant)
&& quotas.len() <= (Type::Role as usize + 1) =>
&& quotas.len() <= (Type::Role as usize + 2) =>
{
principal.inner.set(PrincipalField::Quota, quotas);
}