mirror of
https://github.com/kanidm/kanidm.git
synced 2025-05-20 16:03:55 +02:00
Cleanup
This commit is contained in:
parent
97c6efed67
commit
a20139d6e5
server/lib/src
|
@ -244,15 +244,13 @@ impl SearchEvent {
|
|||
ident: &Identity,
|
||||
filter: Filter<FilterValid>,
|
||||
filter_orig: Filter<FilterValid>,
|
||||
attrs: Option<BTreeSet<Attribute>>,
|
||||
effective_access_check: bool,
|
||||
) -> Self {
|
||||
SearchEvent {
|
||||
ident: Identity::from_impersonate(ident),
|
||||
filter,
|
||||
filter_orig,
|
||||
attrs,
|
||||
effective_access_check,
|
||||
attrs: None,
|
||||
effective_access_check: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ impl IdmServerProxyReadTransaction<'_> {
|
|||
// _ext reduces the entries based on access.
|
||||
let oauth2_related = self
|
||||
.qs_read
|
||||
.impersonate_search_ext(f_executed, f_intent, ident, None, false)?;
|
||||
.impersonate_search_ext(f_executed, f_intent, ident)?;
|
||||
trace!(?oauth2_related);
|
||||
|
||||
// Aggregate results to a Vec of AppLink
|
||||
|
|
|
@ -493,7 +493,7 @@ pub trait QueryServerTransaction<'a> {
|
|||
f_intent_valid: Filter<FilterValid>,
|
||||
event: &Identity,
|
||||
) -> Result<Vec<Arc<EntrySealedCommitted>>, OperationError> {
|
||||
let se = SearchEvent::new_impersonate(event, f_valid, f_intent_valid, None, false);
|
||||
let se = SearchEvent::new_impersonate(event, f_valid, f_intent_valid);
|
||||
self.search(&se)
|
||||
}
|
||||
|
||||
|
@ -503,10 +503,8 @@ pub trait QueryServerTransaction<'a> {
|
|||
f_valid: Filter<FilterValid>,
|
||||
f_intent_valid: Filter<FilterValid>,
|
||||
event: &Identity,
|
||||
attrs: Option<BTreeSet<Attribute>>,
|
||||
acp: bool,
|
||||
) -> Result<Vec<Entry<EntryReduced, EntryCommitted>>, OperationError> {
|
||||
let se = SearchEvent::new_impersonate(event, f_valid, f_intent_valid, attrs, acp);
|
||||
let se = SearchEvent::new_impersonate(event, f_valid, f_intent_valid);
|
||||
self.search_ext(&se)
|
||||
}
|
||||
|
||||
|
@ -532,8 +530,6 @@ pub trait QueryServerTransaction<'a> {
|
|||
filter: Filter<FilterInvalid>,
|
||||
filter_intent: Filter<FilterInvalid>,
|
||||
event: &Identity,
|
||||
attrs: Option<BTreeSet<Attribute>>,
|
||||
acp: bool,
|
||||
) -> Result<Vec<Entry<EntryReduced, EntryCommitted>>, OperationError> {
|
||||
let f_valid = filter
|
||||
.validate(self.get_schema())
|
||||
|
@ -541,7 +537,7 @@ pub trait QueryServerTransaction<'a> {
|
|||
let f_intent_valid = filter_intent
|
||||
.validate(self.get_schema())
|
||||
.map_err(OperationError::SchemaViolation)?;
|
||||
self.impersonate_search_ext_valid(f_valid, f_intent_valid, event, attrs, acp)
|
||||
self.impersonate_search_ext_valid(f_valid, f_intent_valid, event)
|
||||
}
|
||||
|
||||
/// Get a single entry by its UUID. This is used heavily for internal
|
||||
|
@ -614,7 +610,7 @@ pub trait QueryServerTransaction<'a> {
|
|||
let filter_intent = filter_all!(f_eq(Attribute::Uuid, PartialValue::Uuid(uuid)));
|
||||
let filter = filter!(f_eq(Attribute::Uuid, PartialValue::Uuid(uuid)));
|
||||
|
||||
let mut vs = self.impersonate_search_ext(filter, filter_intent, event, None, false)?;
|
||||
let mut vs = self.impersonate_search_ext(filter, filter_intent, event)?;
|
||||
match vs.pop() {
|
||||
Some(entry) if vs.is_empty() => Ok(entry),
|
||||
_ => {
|
||||
|
|
Loading…
Reference in a new issue