|
|
@@ -199,19 +199,21 @@ echo'<div id="tree"></div>';
|
|
|
$tree->set_param('filtr_img', ($tree_procesy_filter->get_arg('filtr_img') == '+'));
|
|
|
$tree->set_param('style', $tree_procesy_filter->get_arg('filtr_view'));
|
|
|
$tree->set_param('search_id', $tree_procesy_filter->get_arg('filtr_search_id'));
|
|
|
- $tree->set_param('getZasobTableID', ProcesHelper::getZasobTableID('CRM_PROCES'));
|
|
|
- $tree->set_param('getZasobTableID_CRM_LISTA_ZASOBOW', ProcesHelper::getZasobTableID('CRM_LISTA_ZASOBOW'));
|
|
|
- $tree->set_param('getZasobTableID_CRM_WSKAZNIK', ProcesHelper::getZasobTableID('CRM_WSKAZNIK'));
|
|
|
- $userAcl = User::getAcl();
|
|
|
- if($userAcl) {
|
|
|
- $tblAcl = $userAcl->getTableAcl(ProcesHelper::getZasobTableID('CRM_PROCES'));
|
|
|
- if($tblAcl)
|
|
|
- if($tblAcl->hasFieldPerm($tblAcl->getFieldIdByName('ID'),'R')) $tree->set_param('hasFieldPerm__ID',1);
|
|
|
- $tblAcl = $userAcl->getTableAcl(ProcesHelper::getZasobTableID('CRM_WSKAZNIK'));
|
|
|
- if($tblAcl)
|
|
|
- if($tblAcl->hasFieldPerm($tblAcl->getFieldIdByName('ID'),'R')) $tree->set_param('hasFieldPerm__CRM_WSKAZNIK__ID',1);
|
|
|
+ $tree->set_param('ProcesTblId', ProcesHelper::getZasobTableID('CRM_PROCES'));
|
|
|
+ $tree->set_param('ZasobTblId', ProcesHelper::getZasobTableID('CRM_LISTA_ZASOBOW'));
|
|
|
|
|
|
+ $tblPytaniaId = ProcesHelper::getZasobTableID('CRM_TESTY_PYTANIA');
|
|
|
+ if ($tblPytaniaId > 0) {
|
|
|
+ $userAcl = User::getAcl();
|
|
|
+ $userAcl->fetchGroups();
|
|
|
+ if ($userAcl->hasTableAcl($tblPytaniaId)) {
|
|
|
+ $tblAcl = $userAcl->getTableAcl($tblPytaniaId);
|
|
|
+ $tblAcl->init($forceTblAclInit = false);
|
|
|
+ $tree->set_param('HasAclPytaniaTbl', true);
|
|
|
+ }
|
|
|
+ $tree->set_param('PytaniaTblId', $tblPytaniaId);
|
|
|
}
|
|
|
+
|
|
|
//TODO: check perm to edit
|
|
|
|
|
|
|