LiveUser
[ class tree: LiveUser ] [ index: LiveUser ] [ all elements ]

Source for file Globals.php

Documentation is available at Globals.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  3.  
  4. /**
  5.  * A framework for authentication and authorization in PHP applications
  6.  *
  7.  * LiveUser is an authentication/permission framework designed
  8.  * to be flexible and easily extendable.
  9.  *
  10.  * Since it is impossible to have a
  11.  * "one size fits all" it takes a container
  12.  * approach which should enable it to
  13.  * be versatile enough to meet most needs.
  14.  *
  15.  * PHP version 4 and 5
  16.  *
  17.  * LICENSE: This library is free software; you can redistribute it and/or
  18.  * modify it under the terms of the GNU Lesser General Public
  19.  * License as published by the Free Software Foundation; either
  20.  * version 2.1 of the License, or (at your option) any later version.
  21.  *
  22.  * This library is distributed in the hope that it will be useful,
  23.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  24.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  25.  * Lesser General Public License for more details.
  26.  *
  27.  * You should have received a copy of the GNU Lesser General Public
  28.  * License along with this library; if not, write to the Free Software
  29.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  30.  * MA  02111-1307  USA
  31.  *
  32.  *
  33.  * @category authentication
  34.  * @package LiveUser
  35.  * @author  Markus Wolff <wolff@21st.de>
  36.  * @author  Helgi Þormar Þorbjörnsson <dufuz@php.net>
  37.  * @author  Lukas Smith <smith@pooteeweet.org>
  38.  * @author  Arnaud Limbourg <arnaud@php.net>
  39.  * @author  Pierre-Alain Joye <pajoye@php.net>
  40.  * @author  Bjoern Kraus <krausbn@php.net>
  41.  * @copyright 2002-2006 Markus Wolff
  42.  * @license http://www.gnu.org/licenses/lgpl.txt
  43.  * @version CVS: $Id: Globals.php,v 1.20 2006/02/27 18:05:28 lsmith Exp $
  44.  * @link http://pear.php.net/LiveUser
  45.  */
  46.  
  47.  
  48. /**
  49.  * This file holds all our default table/fields name/types/relations,
  50.  * if they should be checked and more which are needed by both
  51.  * LiveUser and LiveUser_Admin
  52.  *
  53.  * You can add to those table or modify options via our table/field
  54.  * options in the config.
  55.  */
  56.  
  57. $GLOBALS['_LiveUser']['perm']['tables'= array(
  58.     'perm_users' => array(
  59.         'fields' => array(
  60.             'perm_user_id' => 'seq',
  61.             'auth_user_id' => 'auth_id',
  62.             'auth_container_name' => 'auth_id',
  63.             'perm_type' => false,
  64.          ),
  65.         'joins' => array(
  66.             'userrights' => 'perm_user_id',
  67.             'groupusers' => 'perm_user_id',
  68.             'area_admin_areas' => 'perm_user_id',
  69.         ),
  70.     ),
  71.     'userrights' => array(
  72.         'fields' => array(
  73.             'perm_user_id' => 'id',
  74.             'right_id' => 'id',
  75.             'right_level' => false,
  76.         ),
  77.         'joins' => array(
  78.             'perm_users' => 'perm_user_id',
  79.             'rights' => 'right_id',
  80.         ),
  81.     ),
  82.     'rights' => array(
  83.         'fields' => array(
  84.             'right_id' => 'seq',
  85.             'area_id' => 'define_name',
  86.             'right_define_name' => 'define_name',
  87.             'has_implied' => null,
  88.         ),
  89.         'joins' => array(
  90.             'areas' => 'area_id',
  91.             'userrights' => 'right_id',
  92.             'grouprights' => 'right_id',
  93.             'right_implied' => array(
  94.                 'right_id' => 'right_id',
  95.             ),
  96.             'translations' => array(
  97.                 'right_id' => 'section_id',
  98.                 LIVEUSER_SECTION_RIGHT => 'section_type',
  99.             ),
  100.         ),
  101.     ),
  102.     'right_implied' => array(
  103.         'fields' => array(
  104.             'right_id' => 'id',
  105.             'implied_right_id' => 'id',
  106.         ),
  107.         'joins' => array(
  108.             'rights' => array(
  109.                 'right_id' => 'right_id',
  110.                 'implied_right_id' => 'right_id',
  111.             ),
  112.         ),
  113.     ),
  114.     'translations' => array(
  115.         'fields' => array(
  116.             'translation_id' => 'seq',
  117.             'section_id' => 'translation',
  118.             'section_type' => 'translation',
  119.             'language_id' => 'translation',
  120.             'name' => false,
  121.             'description' => null,
  122.         ),
  123.         'joins' => array(
  124.             'rights' => array(
  125.                 'section_id' => 'right_id',
  126.                 'section_type' => LIVEUSER_SECTION_RIGHT,
  127.             ),
  128.             'areas' => array(
  129.                 'section_id' => 'area_id',
  130.                 'section_type' => LIVEUSER_SECTION_AREA,
  131.             ),
  132.             'applications' => array(
  133.                  'section_id' => 'application_id',
  134.                  'section_type' => LIVEUSER_SECTION_APPLICATION,
  135.             ),
  136.             'groups' => array(
  137.                 'section_id' => 'group_id',
  138.                 'section_type' => LIVEUSER_SECTION_GROUP,
  139.             ),
  140.         ),
  141.     ),
  142.     'areas' => array(
  143.         'fields' => array(
  144.             'area_id' => 'seq',
  145.             'application_id' => 'define_name',
  146.             'area_define_name' => 'define_name',
  147.         ),
  148.         'joins' => array(
  149.             'rights' => 'area_id',
  150.             'applications' => 'application_id',
  151.             'translations' => array(
  152.                 'area_id' => 'section_id',
  153.                 LIVEUSER_SECTION_AREA => 'section_type',
  154.             ),
  155.             'area_admin_areas' => 'area_id',
  156.         ),
  157.     ),
  158.     'area_admin_areas' => array(
  159.         'fields' => array(
  160.             'area_id' => 'id',
  161.             'perm_user_id' => 'id',
  162.         ),
  163.         'joins' => array(
  164.             'perm_users' => 'perm_user_id',
  165.             'areas' => 'area_id',
  166.         )
  167.     ),
  168.     'applications' => array(
  169.         'fields' => array(
  170.             'application_id' => 'seq',
  171.             'application_define_name' => 'define_name',
  172.         ),
  173.         'joins' => array(
  174.             'areas' => 'application_id',
  175.             'translations' => array(
  176.                 'application_id' => 'section_id',
  177.                 LIVEUSER_SECTION_APPLICATION => 'section_type',
  178.             ),
  179.         ),
  180.     ),
  181.     'groups' => array(
  182.         'fields' => array(
  183.             'group_id' => 'seq',
  184.             'group_type' => false,
  185.             'group_define_name' => 'define_name',
  186.         ),
  187.         'joins' => array(
  188.             'groupusers' => 'group_id',
  189.             'grouprights' => 'group_id',
  190.             'group_subgroups' => 'group_id',
  191.             'translations' => array(
  192.                 'group_id' => 'section_id',
  193.                 LIVEUSER_SECTION_GROUP => 'section_type',
  194.             ),
  195.         ),
  196.     ),
  197.     'groupusers' => array(
  198.         'fields' => array(
  199.             'perm_user_id' => 'id',
  200.             'group_id' => 'id',
  201.         ),
  202.         'joins' => array(
  203.             'groups' => 'group_id',
  204.             'perm_users' => 'perm_user_id',
  205.             'grouprights' => 'group_id',
  206.         ),
  207.     ),
  208.     'grouprights' => array(
  209.         'fields' => array(
  210.             'group_id' => 'id',
  211.             'right_id' => 'id',
  212.             'right_level' => false,
  213.         ),
  214.         'joins' => array(
  215.             'rights' => 'right_id',
  216.             'groups' => 'group_id',
  217.             'groupusers' => 'group_id',
  218.         ),
  219.     ),
  220.     'group_subgroups' => array(
  221.         'fields' => array(
  222.             'group_id' => 'id',
  223.             'subgroup_id' => 'id',
  224.         ),
  225.         'joins' => array(
  226.             'groups' => 'group_id',
  227.         ),
  228.     ),
  229. );
  230.  
  231. $GLOBALS['_LiveUser']['perm']['fields'= array(
  232.     'perm_user_id' => 'integer',
  233.     'auth_user_id' => 'text',
  234.     'auth_container_name' => 'text',
  235.     'perm_type' => 'integer',
  236.     'right_id' => 'integer',
  237.     'right_level' => 'integer',
  238.     'area_id' => 'integer',
  239.     'application_id' => 'integer',
  240.     'right_define_name' => 'text',
  241.     'area_define_name' => 'text',
  242.     'application_define_name' => 'text',
  243.     'translation_id' => 'integer',
  244.     'section_id' => 'integer',
  245.     'section_type' => 'integer',
  246.     'name' => 'text',
  247.     'description' => 'text',
  248.     'language_id' => 'text',
  249.     'group_id' => 'integer',
  250.     'group_type' => 'integer',
  251.     'group_define_name' => 'text',
  252.     'has_implied' => 'boolean',
  253.     'implied_right_id' => 'integer',
  254.     'subgroup_id' => 'integer'
  255. );
  256.  
  257. $GLOBALS['_LiveUser']['perm']['alias'= array(
  258.     'perm_user_id' => 'perm_user_id',
  259.     'auth_user_id' => 'auth_user_id',
  260.     'auth_container_name' => 'auth_container_name',
  261.     'perm_type' => 'perm_type',
  262.     'right_id' => 'right_id',
  263.     'right_level' => 'right_level',
  264.     'area_id' => 'area_id',
  265.     'application_id' => 'application_id',
  266.     'right_define_name' => 'right_define_name',
  267.     'area_define_name' => 'area_define_name',
  268.     'application_define_name' => 'application_define_name',
  269.     'translation_id' => 'translation_id',
  270.     'section_id' => 'section_id',
  271.     'section_type' => 'section_type',
  272.     'name' => 'name',
  273.     'description' => 'description',
  274.     'language_id' => 'language_id',
  275.     'group_id' => 'group_id',
  276.     'group_type' => 'group_type',
  277.     'group_define_name' => 'group_define_name',
  278.     'has_implied' => 'has_implied',
  279.     'implied_right_id' => 'implied_right_id',
  280.     'subgroup_id' => 'subgroup_id',
  281.     'perm_users' => 'perm_users',
  282.     'userrights' => 'userrights',
  283.     'applications' => 'applications',
  284.     'areas' => 'areas',
  285.     'area_admin_areas' => 'area_admin_areas',
  286.     'rights' => 'rights',
  287.     'groups' => 'groups',
  288.     'groupusers' => 'groupusers',
  289.     'grouprights' => 'grouprights',
  290.     'right_implied' => 'right_implied',
  291.     'group_subgroups' => 'group_subgroups',
  292.     'translations' => 'translations',
  293. );
  294.  
  295. ?>

Documentation generated on Mon, 28 Jan 2008 03:30:15 -0500 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.