Fix tenant principal limits (fixes #810)
This commit is contained in:
@@ -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::<()>(
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user