[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/includes/modules/ -> modUser.class.php (source)

   1  <?php
   2  /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   *
   4   * This program is free software; you can redistribute it and/or modify
   5   * it under the terms of the GNU General Public License as published by
   6   * the Free Software Foundation; either version 2 of the License, or
   7   * (at your option) any later version.
   8   *
   9   * This program is distributed in the hope that it will be useful,
  10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12   * GNU General Public License for more details.
  13   *
  14   * You should have received a copy of the GNU General Public License
  15   * along with this program; if not, write to the Free Software
  16   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17   *
  18   * $Id: modUser.class.php,v 1.5 2005/10/22 17:30:58 eldy Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/modUser.class.php,v $
  20   */
  21  
  22  /**
  23          \defgroup   user  Module user
  24          \brief      Module pour gérer les utilisateurs
  25  */
  26  
  27  /**
  28          \file       htdocs/includes/modules/modUser.class.php
  29          \ingroup    user
  30          \brief      Fichier de description et activation du module Utilisateur
  31  */
  32  
  33  include_once  "DolibarrModules.class.php";
  34  
  35  /**
  36          \class      modUser
  37          \brief      Classe de description et activation du module User
  38  */
  39  
  40  class modUser extends DolibarrModules
  41  {
  42  
  43     /**
  44      *   \brief      Constructeur. Definit les noms, constantes et boites
  45      *   \param      DB      handler d'accès base
  46      */
  47    function modUser($DB)
  48    {
  49      $this->db = $DB ;
  50      $this->numero = 0 ;
  51  
  52      $this->family = "base";
  53      $this->name = "User";
  54      $this->description = "Gestion des utilisateurs (requis)";
  55  
  56      $this->revision = explode(' ','$Revision: 1.5 $');
  57      $this->version = $this->revision[1];
  58  
  59      $this->const_name = 'MAIN_MODULE_USER';
  60      $this->picto='group';
  61  
  62      // Dir
  63      $this->dirs = array();
  64  
  65      // Config pages
  66      // $this->config_page_url = "/user/admin/index.php";
  67  
  68      // Dépendances
  69      $this->depends = array();
  70      $this->requiredby = array();
  71  
  72      // Constantes
  73      $this->const = array();
  74  
  75      // Boites
  76      $this->boxes = array();
  77  
  78      // Permissions
  79      $this->rights = array();            // L'admin bénéficie toujours des droits de ce module, actif ou non
  80      $this->rights_class = 'user';
  81      $r=0;
  82      
  83      $r++;
  84      $this->rights[$r][0] = 251;
  85      $this->rights[$r][1] = 'Consulter les autres utilisateurs, leurs groupes et permissions';
  86      $this->rights[$r][2] = 'r';
  87      $this->rights[$r][3] = 1;
  88      $this->rights[$r][4] = 'user';
  89      $this->rights[$r][5] = 'lire';
  90  
  91      $r++;
  92      $this->rights[$r][0] = 252;
  93      $this->rights[$r][1] = 'Créer/modifier les autres utilisateurs, leurs groupes et permissions';
  94      $this->rights[$r][2] = 'w';
  95      $this->rights[$r][3] = 0;
  96      $this->rights[$r][4] = 'user';
  97      $this->rights[$r][5] = 'creer';
  98  
  99      $r++;
 100      $this->rights[$r][0] = 253;
 101      $this->rights[$r][1] = 'Modifier mot de passe des autres utilisateurs';
 102      $this->rights[$r][2] = 'w';
 103      $this->rights[$r][3] = 0;
 104      $this->rights[$r][4] = 'user';
 105      $this->rights[$r][5] = 'password';
 106  
 107      $r++;
 108      $this->rights[$r][0] = 254;
 109      $this->rights[$r][1] = 'Supprimer ou désactiver les autres utilisateurs';
 110      $this->rights[$r][2] = 'd';
 111      $this->rights[$r][3] = 0;
 112      $this->rights[$r][4] = 'user';
 113      $this->rights[$r][5] = 'supprimer';
 114  
 115      $r++;
 116      $this->rights[$r][0] = 255;
 117      $this->rights[$r][1] = 'Créer/modifier ses propres infos utilisateur';
 118      $this->rights[$r][2] = 'w';
 119      $this->rights[$r][3] = 1;
 120      $this->rights[$r][4] = 'self';
 121      $this->rights[$r][5] = 'supprimer';
 122  
 123      $r++;
 124      $this->rights[$r][0] = 256;
 125      $this->rights[$r][1] = 'Modifier son propre mot de passe';
 126      $this->rights[$r][2] = 'w';
 127      $this->rights[$r][3] = 1;
 128      $this->rights[$r][4] = 'self';
 129      $this->rights[$r][5] = 'password';
 130    }
 131  
 132  
 133     /**
 134      *   \brief      Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
 135      *               Définit également les répertoires de données à créer pour ce module.
 136      */
 137      function init()
 138      {
 139          global $conf;
 140  
 141          // Permissions
 142          $this->remove();
 143  
 144          $sql = array();
 145      
 146          return $this->_init($sql);
 147      }
 148  
 149    /**
 150      \brief      Fonction appelée lors de la désactivation d'un module.
 151      Supprime de la base les constantes, boites et permissions du module.
 152     */
 153    function remove()
 154    {
 155      $sql = array();
 156  
 157      return $this->_remove($sql);
 158    }
 159  }
 160  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics