feat: when a user adds a mail and is not already a member of skynet-users it... #39
1 changed files with 1 additions and 4 deletions
|
@ -56,10 +56,7 @@ pub async fn submit(mut req: Request<State>) -> tide::Result {
|
||||||
let (rs, _res) = ldap.search(&dn, Scope::Base, "(objectClass=*)", vec!["userPassword", "memberOf"])?.success()?;
|
let (rs, _res) = ldap.search(&dn, Scope::Base, "(objectClass=*)", vec!["userPassword", "memberOf"])?.success()?;
|
||||||
if !rs.is_empty() {
|
if !rs.is_empty() {
|
||||||
let tmp = SearchEntry::construct(rs[0].clone());
|
let tmp = SearchEntry::construct(rs[0].clone());
|
||||||
if tmp.attrs.contains_key("userPassword")
|
if tmp.attrs.contains_key("userPassword") && !tmp.attrs["userPassword"].is_empty() && tmp.attrs["userPassword"][0].starts_with("{SSHA512}") {
|
||||||
&& !tmp.attrs["userPassword"].is_empty()
|
|
||||||
&& tmp.attrs["userPassword"][0].starts_with("{SSHA512}")
|
|
||||||
{
|
|
||||||
pw_keep_same = true;
|
pw_keep_same = true;
|
||||||
}
|
}
|
||||||
if tmp.attrs.contains_key("memberOf") {
|
if tmp.attrs.contains_key("memberOf") {
|
||||||
|
|
Loading…
Reference in a new issue