Site registry.php

From Project Auriga

Jump to: navigation, search

Site_registry.php contains three key things: the $registry array, the $modules array, and the __autoload function.

Contents

[edit] $registry

This array gets loaded with authorization parameters and specific defaults for various modules.

Currently defined:

  • authz
  • project
  • task

[edit] authz

Currently authorization has two components:

  1. minimum level of a module
  2. action-specific permissions
authz->module->'level'->'*' - set this to the minimum user level allowed to access this module
authz->module->'level'->action - set this to the minimum user level allowed to access the action on this module, overrides default
authz->module->'*'->'*' - default access type: all, none, owner
authz->module->group->action - set specific access type for particular user groups and module actions: all, none, owner

Authorization currently first checks level for the current module/action. User must have a level greater than or equal to this level. If the action is not found, it uses the '*' value. This is done in the session_login.

The second authorization is done inside the model classes, and is not well used...

[edit] project

The project sub-array of the registry has two parts:

  1. Project type code => project class name to instantiate
  2. 'billable' => array of project types to designate as billable time

[edit] task

The task sub-array of the registry has another array of arrays inside, keyed by task type. Each task type has an array of the following:

  • type => same as key
  • label => name to use in drop-down
  • class => task class to load

Format:

$registry=>'task'=>type=>'class'=> task class name

[edit] $modules

$modules contains an array of configured modules. To add custom modules, simply add more values to this array in your config.php file.

Default modules:

  • timeclock
  • workpane
  • projects
  • task
  • bill
  • approve
  • pay
  • edit
  • link
  • time_report

In the Request API, these correspond to module_id. Each of these items in the $modules array contains a sub-array with the following:

  • id - same as module_id
  • label - used in tab when module is loaded
  • tpl - default Smarty template to load, if no action is specified
  • class - controller class to load, to process actions
Personal tools