Allow local access tokens to be used with OIDC backends (closes #1311 closes stalwartlabs/webadmin#52)

This commit is contained in:
mdecimus
2025-07-25 21:06:23 +02:00
parent 02f6a114e0
commit 654f296d45
37 changed files with 369 additions and 278 deletions

View File

@@ -17,7 +17,7 @@ use dav_proto::{
response::{Ace, BaseCondition, GrantDeny, Href, MultiStatus, Principal},
},
};
use directory::{QueryBy, Type, backend::internal::manage::ManageDirectory};
use directory::{QueryParams, Type, backend::internal::manage::ManageDirectory};
use groupware::RFC_3986;
use groupware::{cache::GroupwareCache, calendar::Calendar, contact::AddressBook, file::FileNode};
use http_proto::HttpResponse;
@@ -412,7 +412,7 @@ impl DavAclHandler for Server {
// Verify that the principal is a valid principal
let principal = self
.directory()
.query(QueryBy::Id(principal_id), false)
.query(QueryParams::id(principal_id).with_return_member_of(false))
.await
.caused_by(trc::location!())?
.ok_or_else(|| {