|
@@ 442-451 (lines=10) @@
|
| 439 |
|
* @param string $ldapName optional, the display name of the object |
| 440 |
|
* @return string|false with the name to use in Nextcloud, false on DN outside of search DN |
| 441 |
|
*/ |
| 442 |
|
public function dn2groupname($fdn, $ldapName = null) { |
| 443 |
|
//To avoid bypassing the base DN settings under certain circumstances |
| 444 |
|
//with the group support, check whether the provided DN matches one of |
| 445 |
|
//the given Bases |
| 446 |
|
if(!$this->isDNPartOfBase($fdn, $this->connection->ldapBaseGroups)) { |
| 447 |
|
return false; |
| 448 |
|
} |
| 449 |
|
|
| 450 |
|
return $this->dn2ocname($fdn, $ldapName, false); |
| 451 |
|
} |
| 452 |
|
|
| 453 |
|
/** |
| 454 |
|
* accepts an array of group DNs and tests whether they match the user |
|
@@ 498-507 (lines=10) @@
|
| 495 |
|
* @param string $ldapName optional, the display name of the object |
| 496 |
|
* @return string|false with with the name to use in Nextcloud |
| 497 |
|
*/ |
| 498 |
|
public function dn2username($fdn, $ldapName = null) { |
| 499 |
|
//To avoid bypassing the base DN settings under certain circumstances |
| 500 |
|
//with the group support, check whether the provided DN matches one of |
| 501 |
|
//the given Bases |
| 502 |
|
if(!$this->isDNPartOfBase($fdn, $this->connection->ldapBaseUsers)) { |
| 503 |
|
return false; |
| 504 |
|
} |
| 505 |
|
|
| 506 |
|
return $this->dn2ocname($fdn, $ldapName, true); |
| 507 |
|
} |
| 508 |
|
|
| 509 |
|
/** |
| 510 |
|
* returns an internal Nextcloud name for the given LDAP DN, false on DN outside of search DN |