Exemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     $this->remove('default_index');
     $this->addResource(new Kwf_Acl_Resource_MenuDropdown('default_menuitem', array('text' => trlKwfStatic('Dictionaries'), 'icon' => 'book.png')));
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_tasks', array('text' => trlKwfStatic('Tasks'), 'icon' => 'time.png'), '/tasks'));
     $this->addResource(new Kwf_Acl_Resource_MenuDropdown('default_staffmenuitem', array('text' => trlKwfStatic('Employees'), 'icon' => 'user.png')));
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_employees', array('text' => trlKwfStatic('Flight crew'), 'icon' => 'user.png'), '/employees'), 'default_staffmenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_staffs', array('text' => trlKwfStatic('Staff groups'), 'icon' => 'user.png'), '/staffs'), 'default_staffmenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuDropdown('default_flightsmenuitem', array('text' => trlKwfStatic('Flights'), 'icon' => 'calendar.png')));
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_index', array('text' => trlKwfStatic('Flight plans'), 'icon' => 'calendar.png'), '/'), 'default_flightsmenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_myflights', array('text' => trlKwfStatic('My flights'), 'icon' => 'book_open.png'), '/myflights'), 'default_flightsmenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuDropdown('default_edumenuitem', array('text' => trlKwfStatic('Education'), 'icon' => 'database.png')));
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_mytrainings', array('text' => trlKwfStatic('My trainings'), 'icon' => 'user.png'), '/mytrainings'), 'default_edumenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_mygroups', array('text' => trlKwfStatic('My groups'), 'icon' => 'group.png'), '/mygroups'), 'default_edumenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_myresults', array('text' => trlKwfStatic('My results'), 'icon' => 'user.png'), '/myresults'), 'default_edumenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_trainings', array('text' => trlKwfStatic('Trainings'), 'icon' => 'database.png'), '/trainings'), 'default_edumenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_traininggroups', array('text' => trlKwfStatic('Groups'), 'icon' => 'database.png'), '/traininggroups'), 'default_edumenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuDropdown('default_checksmenuitem', array('text' => trlKwfStatic('Checks'), 'icon' => 'calculator.png')));
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_checksdocs', array('text' => trlKwfStatic('Documents checks'), 'icon' => 'calculator.png'), '/checksdocs'), 'default_checksmenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_checksflights', array('text' => trlKwfStatic('Flights checks'), 'icon' => 'calculator.png'), '/checksflights'), 'default_checksmenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_checkstrainings', array('text' => trlKwfStatic('Trainings checks'), 'icon' => 'calculator.png'), '/checkstrainings'), 'default_checksmenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_checkresults', array('text' => trlKwfStatic('Check Results'), 'icon' => 'database.png'), '/checkresults'), 'default_checksmenuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_links', array('text' => trlKwfStatic('General'), 'icon' => 'book.png'), '/links'), 'default_menuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_countries', array('text' => trlKwfStatic('Countries'), 'icon' => 'book.png'), '/countries'), 'default_menuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_airports', array('text' => trlKwfStatic('Airports'), 'icon' => 'book.png'), '/airports'), 'default_menuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_landpoints', array('text' => trlKwfStatic('Landpoints'), 'icon' => 'book.png'), '/landpoints'), 'default_menuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_companies', array('text' => trlKwfStatic('Companies'), 'icon' => 'book.png'), '/companies'), 'default_menuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_wstypes', array('text' => trlKwfStatic('WsTypes'), 'icon' => 'book.png'), '/wstypes'), 'default_menuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('default_airplanes', array('text' => trlKwfStatic('Airplanes'), 'icon' => 'book.png'), '/airplanes'), 'default_menuitem');
     $this->addResource(new Kwf_Acl_Resource_MenuDropdown('default_settingsmenuitem', array('text' => trlKwfStatic('Settings'), 'icon' => 'cog.png')));
     $this->addResource(new Kwf_Acl_Resource_MenuUrl('kwf_user_users', array('text' => trlKwfStatic('Users management'), 'icon' => 'user_suit.png'), '/kwf/user/users'), 'default_settingsmenuitem');
     //$this->addResource(new Zend_Acl_Resource('default_tasks'), 'default_index');
     $this->addResource(new Zend_Acl_Resource('default_flightplans'), 'default_index');
     $this->addResource(new Zend_Acl_Resource('default_link'), 'default_links');
     $this->addResource(new Zend_Acl_Resource('default_linkdata'), 'default_links');
     $this->addResource(new Zend_Acl_Resource('default_linkdataentry'), 'default_linkdata');
     $this->addResource(new Zend_Acl_Resource('default_country'), 'default_countries');
     $this->addResource(new Zend_Acl_Resource('default_airport'), 'default_airports');
     $this->addResource(new Zend_Acl_Resource('default_landpoint'), 'default_landpoints');
     $this->addResource(new Zend_Acl_Resource('default_company'), 'default_companies');
     $this->addResource(new Zend_Acl_Resource('default_wstype'), 'default_wstypes');
     $this->addResource(new Zend_Acl_Resource('default_airplane'), 'default_airplanes');
     $this->addResource(new Zend_Acl_Resource('default_employee'), 'default_employees');
     $this->addResource(new Zend_Acl_Resource('default_staff'), 'default_staffs');
     $this->addResource(new Zend_Acl_Resource('default_staffdocuments'), 'default_staffs');
     $this->addResource(new Zend_Acl_Resource('default_staffdocument'), 'default_staffdocuments');
     $this->addResource(new Zend_Acl_Resource('default_documents'), 'default_employees');
     $this->addResource(new Zend_Acl_Resource('default_document'), 'default_documents');
     $this->addResource(new Zend_Acl_Resource('default_flightaccesses'), 'default_employees');
     $this->addResource(new Zend_Acl_Resource('default_flightaccess'), 'default_flightaccesses');
     $this->addResource(new Zend_Acl_Resource('default_flightresults'), 'default_employees');
     $this->addResource(new Zend_Acl_Resource('default_flightresult'), 'default_flightresults');
     $this->addResource(new Zend_Acl_Resource('default_task'), 'default_tasks');
     $this->addResource(new Zend_Acl_Resource('default_flightplan'), 'default_flightplans');
     $this->addResource(new Zend_Acl_Resource('default_flights'), 'default_flightplans');
     $this->addResource(new Zend_Acl_Resource('default_flight'), 'default_flightplans');
     $this->addResource(new Zend_Acl_Resource('default_flightfiles'), 'default_flight');
     $this->addResource(new Zend_Acl_Resource('default_flightfile'), 'default_flightfiles');
     $this->addResource(new Zend_Acl_Resource('default_myflight'), 'default_myflights');
     $this->addResource(new Zend_Acl_Resource('default_flighttracks'), 'default_flights');
     $this->addResource(new Zend_Acl_Resource('default_flighttrack'), 'default_flighttracks');
     $this->addResource(new Zend_Acl_Resource('default_planerstates'), 'default_flights');
     $this->addResource(new Zend_Acl_Resource('default_planerstate'), 'default_planerstates');
     $this->addResource(new Zend_Acl_Resource('default_flightfullresults'), 'default_flights');
     $this->addResource(new Zend_Acl_Resource('default_flightfullresult'), 'default_flightfullresults');
     $this->addResource(new Zend_Acl_Resource('default_flightgroups'), 'default_flights');
     $this->addResource(new Zend_Acl_Resource('default_flightgroup'), 'default_flightgroups');
     $this->addResource(new Zend_Acl_Resource('default_flightgroupsfilter'), 'default_flightgroup');
     $this->addResource(new Zend_Acl_Resource('default_staffgroups'), 'default_flights');
     $this->addResource(new Zend_Acl_Resource('default_staffgroup'), 'default_staffgroups');
     $this->addResource(new Zend_Acl_Resource('default_staffgroupsfilter'), 'default_staffgroup');
     $this->addResource(new Zend_Acl_Resource('default_training'), 'default_trainings');
     $this->addResource(new Zend_Acl_Resource('default_mytraining'), 'default_mytrainings');
     $this->addResource(new Zend_Acl_Resource('default_mygroup'), 'default_mygroups');
     $this->addResource(new Zend_Acl_Resource('default_myquestions'), 'default_mygroups');
     $this->addResource(new Zend_Acl_Resource('default_myquestion'), 'default_mygroups');
     $this->addResource(new Zend_Acl_Resource('default_myanswers'), 'default_mygroups');
     $this->addResource(new Zend_Acl_Resource('default_trainingquestions'), 'default_trainings');
     $this->addResource(new Zend_Acl_Resource('default_trainingquestion'), 'default_trainingquestions');
     $this->addResource(new Zend_Acl_Resource('default_traininganswers'), 'default_trainingquestion');
     $this->addResource(new Zend_Acl_Resource('default_traininganswer'), 'default_traininganswers');
     $this->addResource(new Zend_Acl_Resource('default_traininggroup'), 'default_traininggroups');
     $this->addResource(new Zend_Acl_Resource('default_trainingresults'), 'default_trainings');
     $this->addResource(new Zend_Acl_Resource('default_trainingresult'), 'default_trainingresults');
     $this->addResource(new Zend_Acl_Resource('default_checkdoc'), 'default_checksdocs');
     $this->addResource(new Zend_Acl_Resource('default_checkflight'), 'default_checksflights');
     $this->addResource(new Zend_Acl_Resource('default_checktraining'), 'default_checkstrainings');
     $this->add(new Zend_Acl_Resource('kwf_user_user'), 'kwf_user_users');
     $this->add(new Zend_Acl_Resource('kwf_user_log'), 'kwf_user_users');
     $this->add(new Zend_Acl_Resource('kwf_user_comments'), 'kwf_user_users');
     $this->addRole(new Kwf_Acl_Role('user', trlStatic('User')));
     $this->addRole(new Kwf_Acl_Role('plan', 'Планирование'));
     $this->add(new Kwf_Acl_Resource_EditRole('edit_role_user', 'user'), 'edit_role');
     $this->add(new Kwf_Acl_Resource_EditRole('edit_role_plan', 'plan'), 'edit_role');
     //$this->add(new Kwf_Acl_Resource_EditRole('edit_role_guest', 'guest'), 'edit_role');
     $this->allow('admin', 'edit_role_user');
     $this->allow('admin', 'edit_role_plan');
     //$this->allow('admin', 'edit_role_guest');
     //$this->allow('user', 'default_links');
     $this->allow('user', 'default_index');
     //$this->allow('user', 'default_employees');
     $this->allow('user', 'default_flightplans');
     //$this->allow('user', 'default_landpoints');
     $this->allow('user', 'default_tasks');
     $this->allow('user', 'default_mytrainings');
     $this->allow('user', 'default_mygroups');
     $this->allow('user', 'default_myquestions');
     $this->allow('user', 'default_myanswers');
     $this->allow('user', 'default_myresults');
     $this->allow('user', 'default_myflights');
     $this->allow('guest', 'default_flightsmenuitem');
     $this->allow('guest', 'default_flightplans');
     $this->allow('guest', 'default_flights');
     $this->allow('guest', 'default_index');
     $this->allow('plan', 'default_flightsmenuitem');
     $this->allow('plan', 'default_flightplans');
     $this->allow('plan', 'default_flights');
     $this->allow('plan', 'default_index');
     $this->allow('plan', 'default_tasks');
     $this->deny('plan', 'default_myflights');
     $this->deny('guest', 'default_myflights');
     $this->allow('admin', 'default_menuitem');
     $this->allow('admin', 'default_settingsmenuitem');
     $this->allow('admin', 'default_checksmenuitem');
     $this->allow('admin', 'default_flightsmenuitem');
     $this->allow('admin', 'default_flightgroupsfilter');
     $this->allow('admin', 'default_staffgroupsfilter');
     $this->allow('admin', 'default_flightplans');
     $this->allow('admin', 'default_myflights');
     $this->allow('admin', 'default_checkresults');
     $this->allow('admin', 'default_checksdocs');
     $this->allow('admin', 'default_checksflights');
     $this->allow('admin', 'default_checkstrainings');
     $this->allow('admin', 'default_mytrainings');
     $this->allow('admin', 'default_mygroups');
     $this->allow('admin', 'default_trainings');
     $this->allow('admin', 'default_trainingquestions');
     $this->allow('admin', 'default_traininggroups');
     $this->allow('admin', 'default_traininganswers');
     $this->allow('admin', 'default_trainingresults');
     $this->allow('admin', 'default_myresults');
     $this->allow('admin', 'default_myquestions');
     $this->allow('admin', 'default_myanswers');
     $this->allow('admin', 'default_flights');
     $this->allow('admin', 'default_tasks');
     $this->allow('admin', 'default_employees');
     $this->allow('admin', 'default_staffs');
     $this->allow('admin', 'default_airplanes');
     $this->allow('admin', 'default_wstypes');
     $this->allow('admin', 'default_companies');
     $this->allow('admin', 'default_airports');
     $this->allow('admin', 'default_landpoints');
     $this->allow('admin', 'default_countries');
     $this->allow('admin', 'default_links');
     $this->allow('admin', 'default_index');
     $this->allow('admin', 'kwf_media_upload');
     $this->allow('admin', 'kwf_user_users');
     $this->allow('guest', 'kwf_media_upload');
     $this->allow('guest', 'kwf_user_login');
     $this->allow(null, 'kwf_error_error');
 }
Exemplo n.º 2
0
 public function __construct()
 {
     parent::__construct();
     $this->add(new Zend_Acl_Resource('kwf_test'));
     $this->allow(null, 'kwf_test');
 }
Exemplo n.º 3
0
 public function __construct()
 {
     parent::__construct();
     $this->addRole(new Kwf_Acl_Role('superuser', trlKwfStatic('Superuser')));
     $this->addRole(new Kwf_Acl_Role('preview', trlKwfStatic('Preview')));
     $this->add(new Kwf_Acl_Resource_EditRole('edit_role_superuser', 'superuser'), 'edit_role');
     $this->add(new Kwf_Acl_Resource_EditRole('edit_role_preview', 'preview'), 'edit_role');
     $this->add(new Zend_Acl_Resource('kwf_debug_class-tree'), 'kwf_debug');
     $this->add(new Zend_Acl_Resource('kwf_debug_logs'), 'kwf_debug');
     $this->add(new Zend_Acl_Resource('kwf_debug_logs-form'), 'kwf_debug_logs');
     $this->add(new Zend_Acl_Resource('kwf_component_web'));
     $this->add(new Zend_Acl_Resource('kwf_component_media'));
     $this->add(new Zend_Acl_Resource('kwf_component_benchmark'));
     $this->add(new Zend_Acl_Resource('kwf_component_show-component'));
     $this->add(new Kwf_Acl_Resource_MenuUrl('kwf_component_pages', array('text' => trlKwfStatic('Page tree'), 'icon' => 'application_side_tree.png')));
     $this->add(new Zend_Acl_Resource('kwf_component_page'), 'kwf_component_pages');
     $this->add(new Zend_Acl_Resource('kwf_component_components'), 'kwf_component_pages');
     // für /component/show
     $this->add(new Zend_Acl_Resource('kwf_component'), 'kwf_component_pages');
     // für /component/edit
     $this->add(new Zend_Acl_Resource('kwf_component_preview'), 'kwf_component_pages');
     $this->add(new Zend_Acl_Resource('kwf_component_root'));
     //Komponenten können hier resourcen anhängen
     $this->addResource(new Kwf_Acl_Resource_MenuDropdown('kwf_enquiries_dropdown', array('text' => trlKwfStatic('Enquiries'), 'icon' => 'email.png')));
     $this->add(new Kwf_Acl_Resource_MenuUrl('kwf_enquiries_enquiries', array('text' => trlKwfStatic('All Enquiries'), 'icon' => 'email.png')), 'kwf_enquiries_dropdown');
     $this->add(new Kwf_Acl_Resource_MenuDropdown('settings', array('text' => trlKwfStatic('Toolbox'), 'icon' => 'wrench.png')));
     $this->add(new Kwf_Acl_Resource_MenuUrl('kwf_user_users', array('text' => trlKwfStatic('Useradministration'), 'icon' => 'user.png')), 'settings');
     $this->add(new Zend_Acl_Resource('kwf_user_user'), 'kwf_user_users');
     $this->add(new Zend_Acl_Resource('kwf_user_log'), 'kwf_user_users');
     $this->add(new Zend_Acl_Resource('kwf_user_comments'), 'kwf_user_users');
     $this->add(new Kwf_Acl_Resource_MenuUrl('kwf_component_clear-cache', array('text' => trlKwfStatic('Clear Cache'), 'icon' => 'database.png')), 'settings');
     $this->add(new Kwf_Acl_Resource_MenuUrl('kwf_redirects_redirects', array('text' => trlKwfStatic('Redirects'), 'icon' => 'page_white_go.png')), 'settings');
     $this->add(new Zend_Acl_Resource('kwf_redirects_redirect'), 'kwf_redirects_redirects');
     $this->add(new Zend_Acl_Resource('kwf_redirects_pages'), 'kwf_redirects_redirect');
     $this->add(new Zend_Acl_Resource('kwc_structure'));
     // Create Structure Resource for all classes
     foreach (Kwc_Abstract::getComponentClasses() as $class) {
         $this->add(new Kwf_Acl_Resource_Component_Structure($class), 'kwc_structure');
     }
     $this->allow('admin', 'kwc_structure');
     $this->allow('superuser', 'kwc_structure');
     $this->allow(null, 'kwf_component_web');
     $this->allow(null, 'kwf_component_media');
     $this->allow('admin', 'kwf_component');
     $this->allow('superuser', 'kwf_component');
     $this->allow('superuser', 'edit_role_superuser');
     $this->allow('superuser', 'edit_role_preview');
     $this->allow('admin', null);
     $this->allow('superuser', 'settings');
     $this->allow('superuser', 'kwf_enquiries_enquiries');
     $this->deny('superuser', 'kwf_component_clear-cache');
     $this->allow('admin', 'kwf_component_show-component');
     $this->allow('admin', 'kwf_component_pages');
     $this->allow('admin', 'kwf_component_benchmark');
     $this->allow('superuser', 'kwf_component_show-component');
     $this->allow('superuser', 'kwf_component_pages');
     $this->allow('preview', 'kwf_component_preview');
     $this->allow(null, 'kwf_component_root');
     $this->deny('guest', 'kwf_welcome_welcome');
     $this->deny('guest', 'kwf_component_pages');
     // Kwf_Component_Acl nicht vergessen für Komponentenrechte!
 }