<?php

$config = array(
    'mandatory'     => true,
    'description'   => 'Client management section.',
    'navButtonLabel'=> /*T*/'Client Info'/*/T*/,
    'versions'      => array(
        '2.8.4'         => array(false, false),
        '3.0.0 alpha1'  => array(true, true),
        '3.0.0 beta1'   => array(false, false),
        '3.0.0 beta2'   => array(false, false),
        '3.0.0 beta3'   => array(false, false),
        '3.0.0 beta4'   => array(false, false),
        '3.0.0 PR1'     => array(false, false),
        '3.0.0 PR2'     => array(true, false),
        '3.0.0'         => array(false, false),
        '3.0.1'         => array(false, true),
        '3.0.2'         => array(false, true),
        '3.1.0 beta1'   => array(true, true),
        '3.1.0 beta2'   => array(false, false),
        '3.1.0 beta3'   => array(false, false),
        '3.1.0 beta4'   => array(true, false),
        '3.1.0 RC1'     => array(false, false),
        '3.1.0'         => array(false, false),
        '3.1.1'         => array(false, false),
        '3.1.2'         => array(false, false),
        '3.1.3'         => array(true, true),
        '3.1.4'         => array(false, false),
    ),
    'dependencies'  => array('newedge' => '3.1.4'),
    'hasSchemaFile' => true,
    'hasInitialData'=> true,
    'hasUninstallSQLScript' => false,
    'hasUninstallPHPScript' => false,
    'order'         => 2,
    'settingTypes'  => array(),
    'defaultView'   => 'ShowCustomerData',
    'defaultView_Mobile' => 'Pending_Mobile',
    'actions'       => array(
        'ActivatePendingCustomer'           =>  'clients_activate',
        'ActivatePackages'                  =>  'clients_activate',
        'AddInvoiceEntry'                   =>  '', // permission handled inside the action                
        'UpdateInvoiceEntry'               =>  '', // permission handled inside the action                
        'SaveNewClient'                     =>  'clients_create_customers',
        'DeleteClient'                      =>  'clients_create_customers',
        'UpdateCustomer'                    =>  '',
        'DeleteDomain'                      =>  'clients_create_customer_packages',
        'SaveNewDomain'                     =>  'clients_create_customer_packages',
        'UpdateDomain'                      =>  '', // permission checked inside action
        'SuspendPackages'                   =>  'clients_edit_customer_packages',
        'CancelPackages'                    =>  'clients_edit_customer_packages',
        'SendEmail'                         =>  'clients_view_domains',
        'UpdateNote'                        =>  'clients_view',
        'CheckDomain'                       =>  '',
        'CheckDomainExists'                 =>  '',
        'GetTax'                            =>  '',
        'ConfirmLogin'                      =>  '',
        'UnSuspendPackages'                 =>  'clients_edit_customer_packages',
        'GetPackages'                       =>  'clients_create_customer_packages',
        'ToggleSideBar'                     =>  '', // handled inside class (user must be logged-in)
        'SetDashboardGraph'                 =>  'clients_view',
        'ActivateDelete_Pending_Mobile'     =>  'clients_edit_customer_packages',
        'SaveClientNote'                    =>  'clients_add_notes',
        'DeleteClientNote'                  =>  'clients_delete_notes',
        'ArchiveClientNotes'                =>  'clients_add_notes',
    ),
    'views'         => array(
        'ShowCustomerData'                  =>  'clients_view',
        'ViewCCNumber'                      =>  'clients_passphrase_cc',
        'ViewInvoices'                      =>  'billing_view',
        'ViewUnInvoicedWork'                =>  'billing_uninvoiced_work',        
        'ShowEntries_Async'                 =>  'billing_view',        
        'ViewInvoiceEntry'                  =>  'billing_create',        
        'AddInvoice'                        =>  'billing_create',
        'ShowEmail'                         =>  'clients_email_customers',
        'GetTemplate_Async'                 =>  'clients_email_customers',        
        'AddDomain'                         =>  'clients_create_customer_packages',
        'AddClient'                         =>  'clients_create_customers',
        'ShowPendingDomainData'             =>  'clients_view_domains',
        'ShowDomainData'                    =>  'clients_view_domains',
        'ViewPendingUsers'                  =>  'clients_view_customers',
        'ViewDeletedUsers'                  =>  'clients_view_customers',
        'ViewFraudUsers'                    =>  'clients_view_customers',
        'ViewGuestUsers'                    =>  'clients_view_customers',
        'ViewActiveUsers'                   =>  'clients_view_customers',
        'ViewInactiveUsers'                 =>  'clients_view_customers',
        'ViewAllUsers'                      =>  'clients_view_customers',
        'AnnouncementDetails'               =>  '',
        'GetPackageAddons'                  =>  'clients_create_customer_packages',
        'GetTLDFields'                      =>  'clients_create_customer_packages',
        'ShowPackageButtons'                =>  'clients_view_domains',
        'ActivatePackageAsync'              =>  'clients_edit_customer_packages',
        'ReturnInvoiceAmountHTML_Async'     =>  'billing_view',
        'ReturnInvoiceStatusHTML_Async'     =>  'billing_view',        
        'ActivatePackagesAsync_Snapshot'    =>  'clients_edit_customer_packages',
        'DeletePackageAsync'                =>  'clients_create_customer_packages',
        'DeletePackagesAsync_Snapshot'      =>  'clients_create_customer_packages',
        'SendWelcomeEmailAsync'             =>  'clients_view_domains',
        'SuspendPackageAsync'               =>  'clients_edit_customer_packages',
        'UnsuspendPackageAsync'             =>  'clients_edit_customer_packages',
        'CancelPackageAsync'                =>  'clients_edit_customer_packages',
        'Snapshot_Pending'                  =>  'clients_create_customers',
        'Snapshot_CCValidation'             =>  'clients_passphrase_cc',
        'ValidateCC_Async'                  =>  'clients_passphrase_cc',
        'ValidateCoupon'                    =>  '',
        'ShowSnapinsCustomer'               =>  '',   // permision handled inside class (only allows non-anonymous)
        'ServerInfo_DashboardTab'           =>  'clients_view_server_info',
        'Clients_ViewEventLog'              =>  'clients_view_eventlog',
        'HistoryFullEmail'                  =>  'clients_view_eventlog',
        'Pending_Mobile'                    =>  'clients_create_customers',
        'HistoryOriginalProfile'            =>  'clients_view_eventlog',
        'HistoryOriginalPackage'            =>  'clients_view_eventlog',
        'EventLogStaffNote'                 =>  'clients_view_eventlog',
        'HistoryShowComments'               =>  'clients_view_eventlog',
        'Snapshot_EventLog'                 =>  'clients_view_eventlog',
        'AddEditNote'                       =>  'clients_add_notes',
        'GetClientNotes'                    =>  'clients_view',
    ),
    'hooks'         => array(
        'Menu'                              =>  'Clients_menu',
        'DashboardTabs'                     =>  array('ServerInfo_DashboardTab' => array(
                                                                                    'internalName'  => 'serverinfo',
                                                                                    'tabLabel'      => /*T*/'Server Info'/*/T*/,
                                                                                    'order'         => 3,
                                                                                    'ajaxOnly'      => true,
                                                                                    ),
                                                ),
        'Snapshots'                         =>  array(  'Snapshot_Pending'      => array(
                                                                                    'tabLabel' => /*T*/'Pending Orders'/*/T*/
                                                                                ),
                                                        'Snapshot_CCValidation' => array(
                                                                                    'tabLabel' => /*T*/'CC Validation'/*/T*/
                                                                                ),
                                                        'Snapshot_EventLog'     => array(
                                                                                    'tabLabel' => /*T*/'Event Log'/*/T*/
                                                                                ),
                                                    ),
        'EventLogging'                      => array('user' => array(   'label'     => /*T*/'User profile'/*/T*/,
                                                                        'classes'   => array('Client_EventLog')
                                                                    ),
                                                      'package' => array(   'label'     => /*T*/'User packages'/*/T*/,
                                                                        'classes'   => array('Package_EventLog'),
                                                                    )
                                                    ),
    ),
);

?>
