Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion sssd_test_framework/roles/ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,7 @@ def add(
shadowMax: int | None = None,
shadowWarning: int | None = None,
shadowLastChange: int | None = None,
shadowExpire: int | None = None,
sn: str | None = None,
givenName: str | None = None,
mail: str | None = None, # Remove later once tests are using the email attribute instead of mail
Expand Down Expand Up @@ -896,6 +897,8 @@ def add(
:type shadowWarning: int | None, optional
:param shadowLastChange: shadowlastchage LDAP attribute, defaults to None
:type shadowLastChange: int | None, optional
:param shadowExpire: shadowexpire LDAP attribute, defaults to None
:type shadowExpire: int | None, optional
:param sn: surname LDAP attribute, defaults to None
:type sn: str | None, optional
:param givenName: givenName LDAP attribute, defaults to None
Expand Down Expand Up @@ -929,12 +932,13 @@ def add(
"shadowMax": shadowMax,
"shadowWarning": shadowWarning,
"shadowLastChange": shadowLastChange,
"shadowExpire": shadowExpire,
"sn": sn,
"givenName": givenName,
"mail": mail or email,
}

if to_list_without_none([shadowMin, shadowMax, shadowWarning, shadowLastChange]):
if to_list_without_none([shadowMin, shadowMax, shadowWarning, shadowLastChange, shadowExpire]):
attrs["objectClass"].append("shadowAccount")

if to_list_without_none([sn, mail, email]):
Expand All @@ -957,6 +961,7 @@ def modify(
shadowMax: int | DeleteAttribute | None = None,
shadowWarning: int | DeleteAttribute | None = None,
shadowLastChange: int | DeleteAttribute | None = None,
shadowExpire: int | DeleteAttribute | None = None,
cn: str | DeleteAttribute | None = None,
sn: str | DeleteAttribute | None = None,
givenName: str | DeleteAttribute | None = None,
Expand Down Expand Up @@ -989,6 +994,8 @@ def modify(
:type shadowWarning: int | DeleteAttribute | None, optional
:param shadowLastChange: shadowlastchage LDAP attribute, defaults to None
:type shadowLastChange: int | DeleteAttribute | None, optional
:param shadowExpire: shadowexpire LDAP attribute, defaults to None
:type shadowExpire: int | DeleteAttribute | None, optional
:param cn: common name LDAP attribute, defaults to None
:type cn: str | DeleteAttribute | None, optional
:param sn: surname LDAP attribute, defaults to None
Expand All @@ -1014,6 +1021,7 @@ def modify(
"shadowMax": shadowMax,
"shadowWarning": shadowWarning,
"shadowLastChange": shadowLastChange,
"shadowExpire": shadowExpire,
"cn": cn,
"sn": sn,
"givenName": givenName,
Expand Down
Loading