mirror of
https://github.com/lldap/lldap.git
synced 2026-03-31 15:07:48 +01:00
server: fix a couple of clippy warnings
This commit is contained in:
committed by
nitnelave
parent
1b58ac61f4
commit
c01c7744c7
@@ -432,7 +432,10 @@ impl<Backend: BackendHandler + LoginHandler + OpaqueHandler> LdapHandler<Backend
|
||||
user_is_admin: bool,
|
||||
change: &LdapModify,
|
||||
) -> LdapResult<()> {
|
||||
if change.modification.atype.to_ascii_lowercase() != "userpassword"
|
||||
if !change
|
||||
.modification
|
||||
.atype
|
||||
.eq_ignore_ascii_case("userpassword")
|
||||
|| change.operation != LdapModifyType::Replace
|
||||
{
|
||||
return Err(LdapError {
|
||||
@@ -530,7 +533,7 @@ impl<Backend: BackendHandler + LoginHandler + OpaqueHandler> LdapHandler<Backend
|
||||
) -> LdapResult<Vec<LdapOp>> {
|
||||
if request.base.is_empty() && request.scope == LdapSearchScope::Base {
|
||||
if let LdapFilter::Present(attribute) = &request.filter {
|
||||
if attribute.to_ascii_lowercase() == "objectclass" {
|
||||
if attribute.eq_ignore_ascii_case("objectclass") {
|
||||
debug!("rootDSE request");
|
||||
return Ok(vec![
|
||||
root_dse_response(&self.ldap_info.base_dn_str),
|
||||
@@ -563,7 +566,7 @@ impl<Backend: BackendHandler + LoginHandler + OpaqueHandler> LdapHandler<Backend
|
||||
let need_groups = request
|
||||
.attrs
|
||||
.iter()
|
||||
.any(|s| s.to_ascii_lowercase() == "memberof");
|
||||
.any(|s| s.eq_ignore_ascii_case("memberof"));
|
||||
get_user_list(
|
||||
&self.ldap_info,
|
||||
filter,
|
||||
|
||||
Reference in New Issue
Block a user