phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] api class.acl.php, 1.1.1.1, 1.1.1.1.2.1 class.base.ph


From: Dan Kuykendall <address@hidden>
Subject: [Phpgroupware-cvs] api class.acl.php, 1.1.1.1, 1.1.1.1.2.1 class.base.php, 1.1.1.1.2.12, 1.1.1.1.2.13 class.phpgw.php, 1.1.1.1.2.16, 1.1.1.1.2.17 core_functions.inc.php, 1.1.1.1.2.8, 1.1.1.1.2.9
Date: Fri, 31 Oct 2003 08:42:35 +0000

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

Modified Files:
      Tag: proposal-branch
        class.acl.php class.base.php class.phpgw.php 
        core_functions.inc.php 
Log Message:
put initial inline doc standard in place

Index: class.base.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.base.php,v
retrieving revision 1.1.1.1.2.12
retrieving revision 1.1.1.1.2.13
diff -C2 -d -r1.1.1.1.2.12 -r1.1.1.1.2.13
*** class.base.php      31 Oct 2003 04:33:46 -0000      1.1.1.1.2.12
--- class.base.php      31 Oct 2003 08:42:33 -0000      1.1.1.1.2.13
***************
*** 27,34 ****
        /* $Source$ */
  
!       /*!
!       @class api_base
!       @abstract Default class for the api operations. Each app is required to 
have one.
!       */
        class api_base
        {
--- 27,79 ----
        /* $Source$ */
  
!       $functions = array();
!       $functions['api_base'] = array(
!               'type'=>'public',
!               'abstract'=>'Main page for everything',
!               'discussion'=>'Default main page'
!       );
!       
!       $functions['start'] = array(
!               'type'=>'public',
!               'title'=>'Home',
!               'abstract'=>'Main page for everything',
!               'discussion'=>'Default main page'
!       );
! 
!       $functions['about'] = array(
!               'type'=>'public',
!               'title'=>'About',
!               'abstract'=>'About data for the API.'
!       );
! 
!       $functions['login'] = array(
!               'type'=>'public',
!               'title'=>'Login',
!               'abstract'=>'Login to the system.'
!       );
! 
!       $functions['logout'] = array(
!               'type'=>'public',
!               'title'=>'Logout',
!               'abstract'=>'Logout from the system. Will revert user back into 
anonymous session.'
!       );
!       
!       $functions['prefs'] = array(
!               'type'=>'public',
!               'title'=>'Preferences',
!               'abstract'=>'Preferences section',
!               'discussion'=>'This is used by all apps to present preferences 
choices to users.',
!               'params'=>array(
!                       'appname'=>array('type'=>'string', 
'default'=>'##REQUIRD##', 'desc'=>'app to display prefs for'),
!                       'form_submit'=>array('type'=>'any', 
'default'=>'##NOTSET##', 'desc'=>'Set if the user is submitting'),
!                       'new_prefs'=>array('type'=>'any', 
'default'=>'##NOTSET##', 'desc'=>'not sure')
!               )
!       );
! 
!       $GLOBALS['docs']['classes']['api_base'] = array(
!               'abstract'=>'Default class for the api ops',
!               'functions'=>$functions
!       );
!       
        class api_base
        {

Index: core_functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/core_functions.inc.php,v
retrieving revision 1.1.1.1.2.8
retrieving revision 1.1.1.1.2.9
diff -C2 -d -r1.1.1.1.2.8 -r1.1.1.1.2.9
*** core_functions.inc.php      31 Oct 2003 02:44:08 -0000      1.1.1.1.2.8
--- core_functions.inc.php      31 Oct 2003 08:42:33 -0000      1.1.1.1.2.9
***************
*** 213,217 ****
                        if(sanitize($appname,'alphanumeric') && 
sanitize($classname,'alphanumeric') && sanitize($methodname,'alphanumeric'))
                        {
!                               $filename = 
PHPGW_ROOT.SEP.$appname.SEP.'starter.inc.php';
                                if(file_exists($filename))
                                {
--- 213,217 ----
                        if(sanitize($appname,'alphanumeric') && 
sanitize($classname,'alphanumeric') && sanitize($methodname,'alphanumeric'))
                        {
!                               $filename = 
PHPGW_ROOT.SEP.$appname.SEP.'constructor.inc.php';
                                if(file_exists($filename))
                                {

Index: class.acl.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.acl.php,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1
*** class.acl.php       23 Oct 2003 07:25:01 -0000      1.1.1.1
--- class.acl.php       31 Oct 2003 08:42:33 -0000      1.1.1.1.2.1
***************
*** 24,27 ****
--- 24,54 ----
        /* $Id$ */
  
+       $functions = array();
+       $functions['api_acl'] = array(
+               'type'=>'public',
+               'abstract'=>'Constructor can take an account_id.',
+               'discussion'=>'Detects if the user is valid, if not it creates 
the user as anoymous, loads up the base classes and sets the default action for 
an anonymous user.
+               If the user is valid, then it loads up their base classes. If 
the user is logging it, then it authenticates them, and either sends them back 
to the login, or loads up their base classes.',
+               'params'=>array(
+                       'force'=>array('type'=>'bool', 'default'=>'required', 
'desc'=>'account id to be used')
+               )
+       );
+       
+       $functions['check'] = array(
+               'type'=>'public',
+               'abstract'=>'Determine if the user has rights to the 
operation/location.',
+               'discussion'=>'Checks their rights and rights masks to 
determine if the user has rights to the specified operation/location.',
+               'params'=>array(
+                       'op'=>array('type'=>'alphanumeric', 
'default'=>'required', 'desc'=>'operation or location'),
+                       'required'=>array('type'=>'number', 'default'=>'1', 
'desc'=>'level of rights required'),
+                       'acl_isop'=>array('type'=>'alphanumeric', 
'default'=>'$this->acl_isop', 'desc'=>'if not an op then it can be used for 
group memberships and such')
+               )
+       );
+       
+       $GLOBALS['docs']['classes']['api_acl'] = array(
+               'abstract'=>'Access Control List (security) object.',
+               'functions'=>$functions
+       );
+       
        class api_acl
        {

Index: class.phpgw.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.phpgw.php,v
retrieving revision 1.1.1.1.2.16
retrieving revision 1.1.1.1.2.17
diff -C2 -d -r1.1.1.1.2.16 -r1.1.1.1.2.17
*** class.phpgw.php     31 Oct 2003 04:33:46 -0000      1.1.1.1.2.16
--- class.phpgw.php     31 Oct 2003 08:42:33 -0000      1.1.1.1.2.17
***************
*** 24,32 ****
        /* $Id$ */
  
!       /*!
!       @class api_phpgw
!       @abstract Central handler class in the api.
!       */
! 
        class api_phpgw
        {
--- 24,31 ----
        /* $Id$ */
  
!       $GLOBALS['docs']['classes']['api_phpgw'] = array(
!               'abstract'=>'Central handler class in the api.'
!       );
!       
        class api_phpgw
        {
***************
*** 263,274 ****
                        if ($GLOBALS['phpgw_data']['api']['op'] != 
'api.base.login' && 
$GLOBALS['phpgw_session']['phpgw_data']['op_history'][count($GLOBALS['phpgw_session']['phpgw_data']['op_history'])
 - 1]['op'] != $GLOBALS['phpgw_data']['api']['op'])
                        {
!                               // I don't like the idea of re-loading this 
class when its already been loaded.
!                               // There should be a global instance of it 
avaiable. (jengo)
!                               list($appname,$class,$method) = 
explode(".",$GLOBALS['phpgw_data']['api']['op']);
!                               $obj = CreateObject($appname . '_' . $class);
! 
!                               if (is_array($obj->method_titles) && 
$obj->method_titles[$method])
                                {
!                                       $_title = 
lang($obj->method_titles[$method]);
                                }
                                else
--- 262,269 ----
                        if ($GLOBALS['phpgw_data']['api']['op'] != 
'api.base.login' && 
$GLOBALS['phpgw_session']['phpgw_data']['op_history'][count($GLOBALS['phpgw_session']['phpgw_data']['op_history'])
 - 1]['op'] != $GLOBALS['phpgw_data']['api']['op'])
                        {
!                               list($appname,$classname,$method) = 
explode(".",$GLOBALS['phpgw_data']['api']['op']);
!                               if 
(isset($GLOBALS['docs']['classes'][$appname.'_'.$classname]['functions'][$method]['title']))
                                {
!                                       $_title = 
lang($GLOBALS['docs']['classes'][$appname.'_'.$classname]['functions'][$method]['title']);
                                }
                                else





reply via email to

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