refactor: remove LdapMaxQueryableAttrs from schema and related code

This commit is contained in:
Sebastiano Tocci 2025-02-19 11:46:27 +01:00
parent 8cf0a398ca
commit 2d953c3734
No known key found for this signature in database
GPG key ID: FE3A50841A291067
3 changed files with 1 additions and 6 deletions
server
lib/src
constants
idm
testkit/tests

View file

@ -1144,7 +1144,6 @@ pub static ref SCHEMA_CLASS_DOMAIN_INFO_DL6: SchemaClass = SchemaClass {
systemmay: vec![
Attribute::DomainSsid,
Attribute::DomainLdapBasedn,
Attribute::LdapMaxQueryableAttrs,
Attribute::LdapAllowUnixPwBind,
Attribute::PrivateCookieKey,
Attribute::FernetPrivateKeyStr,
@ -1170,7 +1169,6 @@ pub static ref SCHEMA_CLASS_DOMAIN_INFO_DL7: SchemaClass = SchemaClass {
systemmay: vec![
Attribute::DomainSsid,
Attribute::DomainLdapBasedn,
Attribute::LdapMaxQueryableAttrs,
Attribute::LdapAllowUnixPwBind,
Attribute::PatchLevel,
Attribute::DomainDevelopmentTaint,
@ -1193,7 +1191,6 @@ pub static ref SCHEMA_CLASS_DOMAIN_INFO_DL8: SchemaClass = SchemaClass {
systemmay: vec![
Attribute::DomainSsid,
Attribute::DomainLdapBasedn,
Attribute::LdapMaxQueryableAttrs,
Attribute::LdapAllowUnixPwBind,
Attribute::Image,
Attribute::PatchLevel,
@ -1217,7 +1214,6 @@ pub static ref SCHEMA_CLASS_DOMAIN_INFO_DL9: SchemaClass = SchemaClass {
systemmay: vec![
Attribute::DomainSsid,
Attribute::DomainLdapBasedn,
Attribute::LdapMaxQueryableAttrs,
Attribute::LdapAllowUnixPwBind,
Attribute::Image,
Attribute::PatchLevel,

View file

@ -281,7 +281,6 @@ impl LdapServer {
self.max_queryable_attrs, attrs_len
);
return Err(OperationError::ResourceLimit);
// TODO: Should we return ResourceLimit or InvalidRequestState here?
}
// We need to retain this to know what the client requested.

View file

@ -239,7 +239,7 @@ async fn test_idm_domain_set_ldap_max_queryable_attrs(rsclient: KanidmClient) {
.await
.is_ok());
assert!(rsclient
.idm_domain_set_ldap_max_queryable_attrs(10) //TODO: Help, Rust's type safety is so good I can't come up with a way to pass an invalid value
.idm_domain_set_ldap_max_queryable_attrs(10)
.await
.is_ok()); // Ideally this should be "is_err"
}