Example #1
0
http://indepnet.net/   http://glpi-project.org
-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

GLPI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("config", "w");
Html::header(AuthMail::getTypeName(2), $_SERVER['PHP_SELF'], "config", "extauth", "imap");
if (Toolbox::canUseImapPop()) {
    Search::show('AuthMail');
}
Html::footer();
Example #2
0
 /**
  * Is an external authentication used ?
  *
  * @return boolean
  **/
 static function useAuthExt()
 {
     //Get all the ldap directories
     if (AuthLdap::useAuthLdap()) {
         return true;
     }
     if (AuthMail::useAuthMail()) {
         return true;
     }
     if (!empty($CFG_GLPI["x509_email_field"])) {
         return true;
     }
     // Existing auth method
     if (!empty($CFG_GLPI["ssovariables_id"])) {
         return true;
     }
     // Using CAS server
     if (!empty($CFG_GLPI["cas_host"])) {
         return true;
     }
     return false;
 }
Example #3
0
-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

GLPI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("config", UPDATE);
Html::header(AuthMail::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "config", "auth", "imap");
if (Toolbox::canUseImapPop()) {
    Search::show('AuthMail');
}
Html::footer();
You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
$AJAX_INCLUDE = 1;
include '../inc/includes.php';
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
Session::checkRight('user', User::UPDATEAUTHENT);
if ($_POST["authtype"] > 0) {
    $name = 'massiveaction';
    if (isset($_POST['name'])) {
        $name = $_POST['name'];
    }
    switch ($_POST["authtype"]) {
        case Auth::DB_GLPI:
            echo "<input type='hidden' name='auths_id' value='0'>";
            break;
        case Auth::LDAP:
        case Auth::EXTERNAL:
            AuthLDAP::dropdown(array('name' => "auths_id", 'condition' => "`is_active` = 1"));
            break;
        case Auth::MAIL:
            AuthMail::dropdown(array('name' => "auths_id", 'condition' => "`is_active` = 1"));
            break;
    }
    echo "&nbsp;<input type='submit' name='{$name}' class='submit' value=\"" . _sx('button', 'Post') . "\">";
}
Example #5
0
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("config", UPDATE);
if (!isset($_GET["id"])) {
    $_GET["id"] = "";
}
$config_mail = new AuthMail();
//IMAP/POP Server add/update/delete
if (isset($_POST["update"])) {
    $config_mail->update($_POST);
    Html::back();
} else {
    if (isset($_POST["add"])) {
        //If no name has been given to this configuration, then go back to the page without adding
        if ($_POST["name"] != "") {
            if (($newID = $config_mail->add($_POST)) && $_SESSION['glpibackcreated']) {
                Html::redirect($config_mail->getFormURL() . "?id=" . $newID);
            }
        }
        Html::back();
    } else {
        if (isset($_POST["purge"])) {
You should have received a copy of the GNU General Public License
along with GLPI; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkRight("config", "w");
if (!isset($_GET["id"])) {
    $_GET["id"] = "";
}
$config_mail = new AuthMail();
//IMAP/POP Server add/update/delete
if (isset($_POST["update"])) {
    $config_mail->update($_POST);
    glpi_header($_SERVER['HTTP_REFERER']);
} else {
    if (isset($_POST["add"])) {
        //If no name has been given to this configuration, then go back to the page without adding
        if ($_POST["name"] != "") {
            $newID = $config_mail->add($_POST);
        }
        glpi_header($_SERVER['HTTP_REFERER']);
    } else {
        if (isset($_POST["delete"])) {
            $config_mail->delete($_POST);
            $_SESSION['glpi_authconfig'] = 2;
// ----------------------------------------------------------------------
// Original Author of file: Julien Dombre
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
if (!isset($_POST['id'])) {
    exit;
}
if (!isset($_REQUEST['glpi_tab'])) {
    exit;
}
checkRight('config', 'r');
$authmail = new AuthMail();
if ($_POST['id'] > 0 && $authmail->can($_POST['id'], 'r')) {
    switch ($_REQUEST['glpi_tab']) {
        case -1:
            Log::showForItem($authmail);
            break;
        case 12:
            Log::showForItem($authmail);
            break;
        default:
            if (!Plugin::displayAction($authmail, $_REQUEST['glpi_tab'])) {
                $authmail->showFormTestMail($_POST['id']);
            }
    }
}
ajaxFooter();