mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #08074
[Bug 925000] Re: make protected instead of private some methods of the class hos of class AuthLdap
** Description changed:
Hello
- Currently Mahara provides an auth plugin named AuthLdap available in
+ Currently Mahara provides an auth plugin named AuthLdap available in
auth/ldap/lib.php
- This class performs nicely its work of authentication and user data synchronisation at loggin time but
- is not able to query the associated ldap servers for other purposes such as getting a list of users, groups
- ... or querying for other attributes.
+ This class performs nicely its work of authentication and user data synchronisation at loggin time but
+ is not able to query the associated ldap servers for other purposes such as getting a list of users, groups
+ ... or querying for other attributes.
- Instead of patching this 'internal class' a better strategy would
+ Instead of patching this 'internal class' a better strategy would
be to allow to extend it
This would simply requires that some methods that are currently declared as private be promoted to protected
- (public is not needed)
+ (public is not needed)
- For example the methods :
+ For example the methods :
- private function ldap_connect($binddn='',$bindpwd='') {
+ protected function ldap_connect($binddn='',$bindpwd='') {
-
+
- private function ldap_find_userdn($ldapconnection, $username) {
+ protected function ldap_find_userdn($ldapconnection, $username) {
-
+
- private function filter_addslashes($text) {
+ protected function filter_addslashes($text) {
- private function get_userinfo_ldap($username, $attrmap ) {
+ protected function get_userinfo_ldap($username, $attrmap ) {
- private function ldap_get_entries($conn, $searchresult) {
+ protected function ldap_get_entries($conn, $searchresult) {
- I don't thing it would introduce any security trouble but I will definitively make other
- developpers happy
+ I don't think it would introduce any security trouble but it will
+ definitively make other developpers happy
- see for example : https://github.com/patrickpollet/mahara_ldap_sync where I have nightly
+ see for example : https://github.com/patrickpollet/mahara_ldap_sync where I have nightly
cli scripts that synch Mahara' institutions users and groups with an LDAP server
Cheers
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/925000
Title:
make protected instead of private some methods of the class hos of
class AuthLdap
Status in Mahara ePortfolio:
New
Bug description:
Hello
Currently Mahara provides an auth plugin named AuthLdap available
in auth/ldap/lib.php
This class performs nicely its work of authentication and user data synchronisation at loggin time but
is not able to query the associated ldap servers for other purposes such as getting a list of users, groups
... or querying for other attributes.
Instead of patching this 'internal class' a better strategy would
be to allow to extend it
This would simply requires that some methods that are currently declared as private be promoted to protected
(public is not needed)
For example the methods :
- private function ldap_connect($binddn='',$bindpwd='') {
+ protected function ldap_connect($binddn='',$bindpwd='') {
- private function ldap_find_userdn($ldapconnection, $username) {
+ protected function ldap_find_userdn($ldapconnection, $username) {
- private function filter_addslashes($text) {
+ protected function filter_addslashes($text) {
- private function get_userinfo_ldap($username, $attrmap ) {
+ protected function get_userinfo_ldap($username, $attrmap ) {
- private function ldap_get_entries($conn, $searchresult) {
+ protected function ldap_get_entries($conn, $searchresult) {
I don't think it would introduce any security trouble but it will
definitively make other developpers happy
see for example : https://github.com/patrickpollet/mahara_ldap_sync where I have nightly
cli scripts that synch Mahara' institutions users and groups with an LDAP server
Cheers
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/925000/+subscriptions
References