Object quotas implementation

This commit is contained in:
mdecimus
2025-10-20 17:54:05 +02:00
parent 59ab6d91ab
commit ce836216a4
37 changed files with 967 additions and 652 deletions

View File

@@ -119,7 +119,7 @@ impl ClientRegistrationHandler for Server {
.filter(|p| p.typ() == Type::OauthClient)
{
if let Some(redirect_uri) = redirect_uri {
if client.urls().iter().any(|uri| uri == redirect_uri) {
if client.urls().any(|uri| uri == redirect_uri) {
return Ok(None);
}
} else {

View File

@@ -210,8 +210,8 @@ impl Autoconfig for Server {
.query(QueryParams::id(id).with_return_member_of(false))
.await
&& principal
.emails
.first()
.emails()
.next()
.is_some_and(|email| email.eq_ignore_ascii_case(emailaddress))
{
account_name = principal.name;

View File

@@ -710,7 +710,7 @@ impl PrincipalManager for Server {
.await?
.ok_or_else(|| trc::ManageEvent::NotFound.into_err())?;
for secret in &principal.secrets {
for secret in principal.secrets() {
if secret.is_otp_auth() {
response.otp_auth = true;
} else if let Some((app_name, _)) =