Skip to content
Permalink
Browse files
includes/default_variables.php:
	#  BitKeeper file /home/ddf/xaraya.com/miko/clone/authldap/includes/default_variables.php
xaradmin/manuallysyncgroups.php:
	#  BitKeeper file /home/ddf/xaraya.com/miko/clone/authldap/xaradmin/manuallysyncgroups.php
xaradminapi/syncgroups.php:
	#  BitKeeper file /home/ddf/xaraya.com/miko/clone/authldap/xaradminapi/syncgroups.php
xartables.php:
	#  BitKeeper file /home/ddf/xaraya.com/miko/clone/authldap/xartables.php
xartemplates/admin-manuallysyncgroups.xd:
	#  BitKeeper file /home/ddf/xaraya.com/miko/clone/authldap/xartemplates/admin-manuallysyncgroups.xd
xaradmin/modifyconfig.php:
	#  add support for ldap groups
xaradmin/updateconfig.php:
	#  add support for ldap groups
xaradminapi/getmenulinks.php:
	#  add support for ldap groups
xarinit.php:
	#  add support for ldap groups
xartemplates/admin-main.xd:
	#  add support for ldap groups
xartemplates/admin-modifyconfig.xd:
	#  add support for ldap groups
xarversion.php:
	#  add support for ldap groups
BitKeeper/etc/logging_ok:
	#  Logging to logging@openlogging.org accepted
  • Loading branch information
miko authored and scmadmin committed Jun 27, 2005
1 parent 3245d0a commit 1aaade0
Show file tree
Hide file tree
Showing 13 changed files with 690 additions and 55 deletions.
@@ -102,6 +102,7 @@ mikespub@sasquatch.pulpcontent.com
mikespub@someone.bru.fsc.net
miko@chris-dudleys-computer.local
miko@miko.homelinux.org
miko@newton.xaraya.com
miko@power.dudleynet
miko@server.(none)
miko@xaraya.com
@@ -0,0 +1,11 @@
<?
$default_groups_variables
= Array('defaultgroup4groups_id' => 1, // Xaraya group ID to attach LDAP groups to (1 = tree root)
'ldap_groups_to_import' => '', // Comma-separated list of groups to look for and import
'group_name_attrname' => 'cn', // Attribute name of the group's human-readable name
'group_ref_attrname' => 'uniquegroup', // Attribute name that references children groups
'group_ref_attrtype' => 'dn', // Attribute type of children groups references
'user_ref_attrname' => 'uniquemember', // Attribute name that references group members
'user_ref_attrtype' => 'dn', // Attribute type of member references
'ldap_base4groups' => 'ou=memberlist,ou=groups,o=corp.com' // Base of group search
);
@@ -0,0 +1,28 @@
<?
/**
* File: $Id: manuallysyncgroups.php,v 1.2 2005/06/23 05:58:53 root Exp $
*
* AuthLDAP
*
* @package authentication
* @copyright (C) 2002 by the Xaraya Development Team.
* @license GPL <http://www.gnu.org/licenses/gpl.html>
* @link http://www.xaraya.com
*
* @subpackage authldap
* @author Chris Dudley <miko@xaraya.com> | Richard Cave <rcave@xaraya.com> | Sylvain Beucler <beuc@beuc.net>
*/

/**
* Calls the groups synchronization On Demand (tm), rather than
* waiting for the cron job.
*/
function authldap_admin_manuallysyncgroups()
{
// Security check
if(!xarSecurityCheck('AdminAuthLDAP')) return false;

$success = xarModAPIFunc('authldap', 'admin', 'syncgroups', array());
return array('success' => $success);
}
?>
@@ -1,6 +1,6 @@
<?php
/**
* File: $Id$
* File: $Id: modifyconfig.php,v 1.1 2005/06/23 05:58:58 root Exp $
*
* AuthLDAP Administrative Display Functions
*
@@ -12,6 +12,7 @@
* @subpackage authldap
* @author Chris Dudley <miko@xaraya.com>
* @author Richard Cave <rcave@xaraya.com>
* @author Sylvain Beucler <beuc@beuc.net>
*/

/**
@@ -92,13 +93,20 @@ function authldap_admin_modifyconfig()
// Get the list of groups
if (!$groupRoles = xarGetGroups()) return; // throw back

$i = 0;
while (list($key,$group) = each($groupRoles)) {
$groups[$i]['name'] = xarVarPrepForDisplay($group['name']);
$i++;
$group = array();
foreach ($groupRoles as $group) {
$groups[] = array('name' => xarVarPrepForDisplay($group['name']),
'id' => $group['uid']);
}
$data['groups'] = $groups;



/** LDAP Groups parameters **/

include_once('modules/authldap/includes/default_variables.php');
foreach(array_keys($default_groups_variables) as $variable)
$data[$variable] = xarVarPrepForDisplay(xarModGetVar('authldap', $variable));

// everything else happens in Template for now
return $data;
}
@@ -1,6 +1,6 @@
<?php
/**
* File: $Id$
* File: $Id: updateconfig.php,v 1.1 2005/06/23 05:59:02 root Exp $
*
* AuthLDAP Administrative Display Functions
*
@@ -10,7 +10,9 @@
* @link http://www.xaraya.com
*
* @subpackage authldap
* @author Chris Dudley <miko@xaraya.com> | Richard Cave <rcave@xaraya.com>
* @author Chris Dudley <miko@xaraya.com>
* @author Richard Cave <rcave@xaraya.com>
* @author Sylvain Beucler <beuc@beuc.net>
*/

/**
@@ -131,6 +133,13 @@ function authldap_admin_updateconfig()
}
xarModSetVar('authldap', 'defaultgroup', $defaultgroup);


// Groups variables
include_once('modules/authldap/includes/default_variables.php');
foreach (array_keys($default_groups_variables) as $variable)
xarModSetVar('authldap', $variable, xarVarCleanFromInput($variable));


$authmodules = xarConfigGetVar('Site.User.AuthenticationModules');
if (empty($activate) && in_array('authldap', $authmodules)) {
$newauth = array();
@@ -1,6 +1,6 @@
<?php
/**
* File: $Id$
* File: $Id: getmenulinks.php,v 1.1 2005/06/23 05:57:00 root Exp $
*
* AuthLDAP Administrative Display Functions
*
@@ -22,18 +22,22 @@
*/
function authldap_adminapi_getmenulinks()
{
// Security check
if(xarSecurityCheck('AdminAuthLDAP')) {
$menulinks[] = Array('url' => xarModURL('authldap',
'admin',
'modifyconfig'),
'title' => xarML('Modify the configuration for the module'),
'label' => xarML('Modify Config'));
} else {
$menulinks = '';
}

return $menulinks;
// Security check
if(xarSecurityCheck('AdminAuthLDAP')) {
$menulinks[] = Array('url' => xarModURL('authldap',
'admin',
'modifyconfig'),
'title' => xarML('Modify the configuration for the module'),
'label' => xarML('Modify Config'));
$menulinks[] = Array('url' => xarModURL('authldap',
'admin',
'manuallysyncgroups'),
'title' => xarML('Forces group synchronization with LDAP'),
'label' => xarML('Manually Sync Groups'));
} else {
$menulinks = '';
}

return $menulinks;
}

?>

0 comments on commit 1aaade0

Please sign in to comment.