Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of filters in search #3

Open
marcbowes opened this issue Feb 5, 2016 · 0 comments
Open

Use of filters in search #3

marcbowes opened this issue Feb 5, 2016 · 0 comments

Comments

@marcbowes
Copy link

Currently this code exists:

// connection.rs
    pub fn search(&mut self,
                  base: String,
                  scope: Scope,
                  alias: DerefAlias,
                  size_limit: i32,
                  time_limit: i32,
                  types_only: bool,
                  filters: Tag, // TODO: Figure something out...
                  attributes: Vec<String>
           ) -> LDAPResult<Vec<Entry>>
    {

It looks like there is a whole layer (or more) of extraction missing for filters. In lieu of that, I have no idea how to do basic searches e.g. cn=whatever. I tried something like this, but honestly I'm pretty lost.. :)

let filters = {
        let payload = Payload::Primitive(Vec::from("(cn=whatever)".as_bytes()));
        Tag::new(Class::Universal(Type::GeneralString), payload)
    };

Is this something that can be done with the library as it stands today? I don't have very complicated requirements, so a workaround would be fine..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant