Skip to content

crud: remove UID-only DN construction assumptions #43

@keaz

Description

@keaz

/Users/kasunranasinghe/Projects/Rust/simple-ldap/src/lib.rs:852, src/lib.rs:925, and src/lib.rs:1031 hard-code uid={uid},{base} inside create, update, and delete.

Problem

The high-level API currently forces UID-based DN construction and makes non-UID naming attributes harder or impossible to use.

Proposal

Add generic DN-based variants:

  • create_with_dn(dn: &str, data: ...)
  • update_with_dn(dn: &str, data: ...)
  • delete_with_dn(dn: &str)

Keep the current UID-based helpers for backwards compatibility and route them through the new generic variants.

Acceptance criteria

  • Add generic DN-based APIs.
  • Keep existing UID methods behavior unchanged.
  • Add integration/unit tests covering non-UID DNs (custom RDN attribute + different base paths).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions