コード例 #1
0
ファイル: admin.php プロジェクト: nickl-/tuleap
$vLdapGroup->required();
if ($request->isPost() && $request->valid($vLdapGroup)) {
    $ldapGroupManager = new LDAP_ProjectGroupManager($ldapPlugin->getLdap());
    $ldapGroupManager->setId($groupId);
    $ldapGroupManager->setGroupName($request->get('ldap_group'));
    if ($request->existAndNonEmpty('delete')) {
        //
        // Remove link between Project Members and LDAP Group
        //
        $ldapGroupManager->unbindFromBindLdap();
        $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId);
    } elseif ($request->existAndNonEmpty('update')) {
        //
        // Perform Project Members <-> LDAP Group synchro
        //
        $ldapGroupManager->bindWithLdap($bindOption);
        $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId);
    } elseif ($request->exist('cancel')) {
        //
        // Cancel operations
        //
        $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId);
    } else {
        //
        // Display to user what will be done with project members.
        //
        $toRemove = $ldapGroupManager->getUsersToBeRemoved($bindOption);
        $toAdd = $ldapGroupManager->getUsersToBeAdded($bindOption);
        $notImpacted = $ldapGroupManager->getUsersNotImpacted($bindOption);
        if (is_array($toAdd)) {
            // Display
コード例 #2
0
ファイル: admin.php プロジェクト: pombredanne/tuleap
$vLdapGroup->required();
if ($request->isPost() && $request->valid($vLdapGroup)) {
    $ldapGroupManager = new LDAP_ProjectGroupManager($ldapPlugin->getLdap());
    $ldapGroupManager->setId($groupId);
    $ldapGroupManager->setGroupName($request->get('ldap_group'));
    if ($request->existAndNonEmpty('delete')) {
        //
        // Remove link between Project Members and LDAP Group
        //
        $ldapGroupManager->unbindFromBindLdap();
        $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId);
    } elseif ($request->existAndNonEmpty('update')) {
        //
        // Perform Project Members <-> LDAP Group synchro
        //
        $ldapGroupManager->bindWithLdap($bindOption, $synchro);
        $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId);
    } elseif ($request->exist('cancel')) {
        //
        // Cancel operations
        //
        $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId);
    } else {
        //
        // Display to user what will be done with project members.
        //
        $toRemove = $ldapGroupManager->getUsersToBeRemoved($bindOption);
        $toAdd = $ldapGroupManager->getUsersToBeAdded($bindOption);
        $notImpacted = $ldapGroupManager->getUsersNotImpacted($bindOption);
        if (is_array($toAdd)) {
            // Display