phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] api class.acl_mgr.php,NONE,1.1.2.1


From: Joseph Engo <address@hidden>
Subject: [Phpgroupware-cvs] api class.acl_mgr.php,NONE,1.1.2.1
Date: Mon, 17 Nov 2003 20:43:58 +0000

Update of /cvsroot/phpgroupware/api
In directory subversions:/tmp/cvs-serv21019

Added Files:
      Tag: proposal-branch
        class.acl_mgr.php 
Log Message:
Created a sample ACL manager, its currently only a form.  It has static test 
values and doesn't store anything.  This layout is going to change, I wanted to 
get it in CVS for archive purposes.  I might end up going seperate screens for 
"Allow" and "Deny" rights.


--- NEW FILE: class.acl_mgr.php ---
<?php
        
/**************************************************************************\
        * phpGroupWare                                                          
   *
        * http://www.phpgroupware.org                                           
   *
        * This file written by Joseph Engo <address@hidden>                *
        * Copyright (C) 2003 Joseph Engo                                        
   *
        * 
-------------------------------------------------------------------------*
        * This library is part of the phpGroupWare API                          
   *
        * http://www.phpgroupware.org/api                                       
   * 
        * 
------------------------------------------------------------------------ *
        * This library is free software; you can redistribute it and/or modify 
it  *
        * under the terms of the GNU Lesser General Public License as published 
by *
        * the Free Software Foundation; either version 2.1 of the License,      
   *
        * or any later version.                                                 
   *
        * This library 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 Lesser General Public License for more details.           
   *
        * You should have received a copy of the GNU Lesser General Public 
License *
        * along with this library; if not, write to the Free Software 
Foundation,  *
        * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA         
   *
        
\**************************************************************************/

        /* $Id: class.acl_mgr.php,v 1.1.2.1 2003/11/17 20:43:54 jengo Exp $ */
        /* $Source: /cvsroot/phpgroupware/api/Attic/class.acl_mgr.php,v $ */

        $functions             = array();
        $functions['api_acl_mgr'] = array(
                'type'         => 'public',
                'abstract'     => 'ACL manager',
                'discussion'   => 'ACL manager'
        );

        $functions['account']  = array(
                'type'         => 'public',
                'title'        => 'Account ACL manager',
                'abstract'     => 'ACL manager for accounts'
        );

        $functions['record']   = array(
                'type'         => 'public',
                'title'        => 'Record ACL manager',
                'abstract'     => 'ACL manager for records'
        );

        $GLOBALS['docs']['api']['classes']['api_acl_mgr'] = array(
                'abstract'  => 'ACL management',
                'functions' => $functions
        );

        class api_acl_mgr
        {
                function api_acl_mgr()
                {
                        $GLOBALS['phpgw']->add_xsl('api.acl_mgr');
                }

                function account()
                {
                        $result['acl_options'][] = array(
                                'app'       => 'api',
                                'title'     => 'Accounts manager',
                                'locations' => array(
                                        0 => array(
                                                'title'    => 'Create accounts',
                                                'location' => 
'account_mgr.create',
                                                'value'    => 1
                                        ),
                                        1 => array(
                                                'title'    => 'View accounts',
                                                'location' => 
'account_mgr.view',
                                                'value'    => 2
                                        ),
                                        2 => array(
                                                'title'    => 'Delete accounts',
                                                'location' => 
'account_mgr.delete',
                                                'value'    => 4
                                        )
                                )

                        );
                        $result['acl_options'][] = array(
                                'app'       => 'calendar',
                                'title'     => 'Calendar',
                                'locations' => array(
                                        0 => array(
                                                'title'    => 'Create entrys',
                                                'location' => 'base.create',
                                                'value'    => 1
                                        ),
                                        1 => array(
                                                'title'    => 'Edit entry',
                                                'location' => 'base.edit',
                                                'value'    => 2
                                        ),
                                        2 => array(
                                                'title'    => 'Delete entrys',
                                                'location' => 'base.delete',
                                                'value'    => 4
                                        ),
                                        3 => array(
                                                'title'    => 'Import entrys',
                                                'location' => 'base.import',
                                                'value'    => 8
                                        ),
                                        4 => array(
                                                'title'    => 'Export entrys',
                                                'location' => 'base.export',
                                                'value'    => 16
                                        )
                                )

                        );
                        $result['acl_options'][] = array(
                                'app'       => 'wcm',
                                'title'     => 'Web content manager'
                        );

                        $result['acl_options'][] = array(
                                'app'       => 'tts',
                                'title'     => 'Trouble Tickets',
                                'locations' => array(
                                        0 => array(
                                                'title'    => 'Create ticket',
                                                'location' => 'base.create',
                                                'values'   => array(
                                                        0 => array(
                                                                'title' => 
'Assign to other user',
                                                                'value' => 1
                                                        ),
                                                        1 => array(
                                                                'title' => 
'Assign to other group',
                                                                'value' => 2
                                                        ),
                                                        2 => array(
                                                                'title' => 'Set 
priority',
                                                                'value' => 4
                                                        )
                                                ),
                                        ),
                                        1 => array(
                                                'title'    => 'Edit ticket',
                                                'location' => 'base.edit',
                                                'values'   => array(
                                                        0 => array(
                                                                'title' => 
'Re-assign to other user',
                                                                'value' => 1
                                                        ),
                                                        1 => array(
                                                                'title' => 
'Re-assign to other group',
                                                                'value' => 2
                                                        ),
                                                        2 => array(
                                                                'title' => 'Set 
priority',
                                                                'value' => 4
                                                        ),
                                                        3 => array(
                                                                'title' => 
'Change status',
                                                                'value' => 8
                                                        )
                                                ),
                                        ),
                                        2 => array(
                                                'title'    => 'View Ticket',
                                                'location' => 'base.view',
                                                'value'    => 1
                                        ),
                                        3 => array(
                                                'title'    => 'Show closed 
tickets',
                                                'location' => 
'base.show_closed',
                                                'value'    => 2
                                        )
                                )
                        );

                        $result['acl_options'][] = array(
                                'app'       => 'test1',
                                'title'     => 'Test 1',
                                'locations' => array(
                                        0 => array(
                                                'title'    => 'A',
                                                'location' => 'base.A',
                                                'value'    => 1
                                        )
                                )
                        );
                        $result['acl_options'][] = array(
                                'app'       => 'test2',
                                'title'     => 'Test 2',
                                'locations' => array(
                                        0 => array(
                                                'title'    => 'A',
                                                'location' => 'base.A',
                                                'value'    => 1
                                        ),
                                        1 => array(
                                                'title'    => 'B',
                                                'location' => 'base.B',
                                                'value'    => 2
                                        )
                                )
                        );

                        $result['acl_options'][] = array(
                                'app'       => 'test3',
                                'title'     => 'Test 3',
                                'locations' => array(
                                        0 => array(
                                                'title'    => 'A',
                                                'location' => 'base.A',
                                                'value'    => 1
                                        ),
                                        1 => array(
                                                'title'    => 'B',
                                                'location' => 'base.B',
                                                'value'    => 2
                                        ),
                                        2 => array(
                                                'title'    => 'C',
                                                'location' => 'base.C',
                                                'value'    => 4
                                        ),
                                        3 => array(
                                                'title'    => 'D',
                                                'location' => 'base.D',
                                                'value'    => 8
                                        )
                                )
                        );
                        $result['action'] = 'acl_mgr_account';
                        return $result;
                }

                function record()
                {

                }
        }







reply via email to

[Prev in Thread] Current Thread [Next in Thread]