iF.SVNAdmin icon indicating copy to clipboard operation
iF.SVNAdmin copied to clipboard

add missing functions to LdapUserViewProvider

Open tbenk opened this issue 6 years ago • 1 comments

LDAP does not work out of the box for me, i had to add the following three dummy functions to get it working:

  • getGroupsOfSubgroup($objGroup)
  • getSubgroupsOfGroup($objGroup)
  • isSubgroupInGroup($objSubgroup, $objGroup)

Error message:

[Tue Aug 29 05:32:21.674119 2017] [:error] [pid 25831] [client 77.20.128.83:7317] PHP Fatal error: Class svnadmin\providers\ldap\LdapUserViewProvider contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (svnadmin\core\interfaces\IGroupViewProvider::getGroupsOfSubgroup, svnadmin\core\interfaces\IGroupViewProvider::getSubgroupsOfGroup, svnadmin\core\interfaces\IGroupViewProvider::isSubgroupInGroup) in /srv/www/htdocs/svnadmin/classes/providers/ldap/LdapUserViewProvider.class.php on line 22

tbenk avatar Aug 29 '17 06:08 tbenk

Hey there, in case anybody else does have issues with ldap: this implementation is not correct and DOES NOT work. LDAP itself doesn't support nested groups (or inheritance) so those methods can be implemented correctly fairly easily:

  • return an empty array in getGroupsOfSubgroup and getSubgroupsOfGroup (return array();)
  • return false in isSubgroupInGroup

Hope this is cutting an hour of searching from anyone who tries it next ;)

Rincewind34 avatar Dec 08 '21 16:12 Rincewind34