Пример #1
0
 /**
  *  @see CommonGLPI::getMenuContent()
  *
  *  @since version 0.85
  **/
 static function getMenuContent()
 {
     $menu = array();
     if (Config::canUpdate()) {
         $menu['title'] = __('Authentication');
         $menu['page'] = '/front/setup.auth.php';
         $menu['options']['ldap']['title'] = AuthLDAP::getTypeName(Session::getPluralNumber());
         $menu['options']['ldap']['page'] = '/front/authldap.php';
         $menu['options']['ldap']['links']['search'] = '/front/authldap.php';
         $menu['options']['ldap']['links']['add'] = '' . '/front/authldap.form.php';
         $menu['options']['imap']['title'] = AuthMail::getTypeName(Session::getPluralNumber());
         $menu['options']['imap']['page'] = '/front/authmail.php';
         $menu['options']['imap']['links']['search'] = '/front/authmail.php';
         $menu['options']['imap']['links']['add'] = '' . '/front/authmail.form.php';
         $menu['options']['others']['title'] = __('Others');
         $menu['options']['others']['page'] = '/front/auth.others.php';
         $menu['options']['settings']['title'] = __('Setup');
         $menu['options']['settings']['page'] = '/front/auth.settings.php';
     }
     if (count($menu)) {
         return $menu;
     }
     return false;
 }
Пример #2
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();
Пример #3
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();
Пример #4
0
 /**
  * Get name of an authentication method
  *
  * @param $authtype Authentication method
  * @param $auths_id Authentication method ID
  * @param $link show links to config page ?
  * @param $name override the name if not empty
  *
  * @return string
  */
 static function getMethodName($authtype, $auths_id, $link = 0, $name = '')
 {
     global $LANG;
     switch ($authtype) {
         case self::LDAP:
             $auth = new AuthLdap();
             if ($auth->getFromDB($auths_id)) {
                 return $auth->getTypeName() . "&nbsp;" . $auth->getLink();
             }
             return $LANG['login'][2] . "&nbsp;{$name}";
         case self::MAIL:
             $auth = new AuthMail();
             if ($auth->getFromDB($auths_id)) {
                 return $auth->getTypeName() . "&nbsp;" . $auth->getLink();
             }
             return $LANG['login'][3] . "&nbsp;{$name}";
         case self::CAS:
             $out = $LANG['login'][4];
             if ($auths_id > 0) {
                 $auth = new AuthLdap();
                 if ($auth->getFromDB($auths_id)) {
                     $out .= " + " . $auth->getTypeName() . "&nbsp;" . $auth->getLink();
                 }
             }
             return $out;
         case self::X509:
             $out = $LANG['setup'][190];
             if ($auths_id > 0) {
                 $auth = new AuthLdap();
                 if ($auth->getFromDB($auths_id)) {
                     $out .= " + " . $auth->getTypeName() . "&nbsp;" . $auth->getLink();
                 }
             }
             return $out;
         case self::EXTERNAL:
             $out = $LANG['common'][62];
             if ($auths_id > 0) {
                 $auth = new AuthLdap();
                 if ($auth->getFromDB($auths_id)) {
                     $out .= " + " . $auth->getTypeName() . "&nbsp;" . $auth->getLink();
                 }
             }
             return $out;
         case self::DB_GLPI:
             return $LANG['login'][18];
         case self::NOT_YET_AUTHENTIFIED:
             return $LANG['login'][9];
     }
     return '';
 }