mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 04:27:02 +01:00
Unsafe search
This commit is contained in:
parent
76d481bd44
commit
8ff46dd4c1
|
@ -19,9 +19,6 @@ macro_rules! log_event {
|
|||
})
|
||||
}
|
||||
|
||||
// This is the core of the server. It implements all
|
||||
// the search and modify actions, applies access controls
|
||||
// and get's everything ready to push back to the fe code
|
||||
|
||||
// We need to pass in config for this later
|
||||
// Or we need to pass in the settings for it IE level and dest?
|
||||
|
|
10
src/main.rs
10
src/main.rs
|
@ -12,7 +12,7 @@ extern crate uuid;
|
|||
// use actix::prelude::*;
|
||||
use actix_web::{
|
||||
error, http, middleware, App, AsyncResponder, Error, FutureResponse, HttpMessage, HttpRequest,
|
||||
HttpResponse, Json, Path, State,
|
||||
HttpResponse, Json, Path, State
|
||||
};
|
||||
|
||||
use bytes::BytesMut;
|
||||
|
@ -89,6 +89,7 @@ fn search(
|
|||
// FIXME: entries should not be EventResult type
|
||||
Ok(entries) => Ok(HttpResponse::Ok().json(entries)),
|
||||
Err(_) => Ok(HttpResponse::InternalServerError().into()),
|
||||
// Err(_) => Ok(error::ErrorInternalServerError("Test error").into()),
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
@ -161,6 +162,13 @@ fn main() {
|
|||
// Connect all our end points here.
|
||||
.middleware(middleware::Logger::default())
|
||||
.resource("/", |r| r.f(index))
|
||||
//
|
||||
/*
|
||||
.resource("/create", |r| {
|
||||
r.method(http::Method::POST)
|
||||
.with(create)
|
||||
})
|
||||
*/
|
||||
// curl --header "Content-Type: application/json" --request POST --data '{ "filter" : { "Eq": ["class", "user"] }}' http://127.0.0.1:8080/search
|
||||
.resource("/search", |r| {
|
||||
r.method(http::Method::POST)
|
||||
|
|
Loading…
Reference in a new issue