Protection avec les droits des informations de surveillance

This commit is contained in:
Michael RICOIS 2012-03-01 13:10:25 +00:00
parent b2c91ef509
commit 72f05a32bc
17 changed files with 50 additions and 8 deletions

View File

@ -57,6 +57,9 @@ class DirigeantController extends Zend_Controller_Action
$this->view->assign('exportObjet', $dirigeants);
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
$user = new Utilisateur();
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
}
/**
@ -86,6 +89,9 @@ class DirigeantController extends Zend_Controller_Action
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('infos', $infos);
$user = new Utilisateur();
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
}
public function opAction()
@ -113,5 +119,8 @@ class DirigeantController extends Zend_Controller_Action
$this->view->assign('exportObjet', $dirigeants);
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
$user = new Utilisateur();
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
}
}

View File

@ -97,6 +97,8 @@ class EvaluationController extends Zend_Controller_Action
$this->view->assign('indiscore', $infos);
$this->view->assign('AutrePage', $autrePage);
$this->view->assign('exportObjet', $infos);
$this->view->assign('surveillance', $user->checkPerm('survscore'));
}
/**

View File

@ -931,6 +931,8 @@ class FinanceController extends Zend_Controller_Action
if ( $user->checkPerm('UPLOADBILAN') ) {
$this->view->assign('saisiebilan', true);
}
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
/** Partie vue **/
$this->view->haveLiasse = ($listBilan->nbReponses > 0) ? true : false;

View File

@ -340,6 +340,8 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $this->entrep->getRaisonSociale());
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
}
/**
@ -466,6 +468,8 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $this->entrep->getRaisonSociale());
$this->view->assign('surveillance', $user->checkPerm('survactes'));
}
/**
@ -656,6 +660,9 @@ class PiecesController extends Zend_Controller_Action
$session = new SessionEntreprise($this->siret, $this->id);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$user = new Utilisateur();
$this->view->assign('surveillance', $user->checkPerm('survactes'));
}
public function statutsAction()
@ -1716,6 +1723,9 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$user = new Utilisateur();
$this->view->assign('surveillance', $user->checkPerm('survpriv'));
}

View File

@ -16,6 +16,7 @@
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
@ -25,6 +26,7 @@
))?>
</td>
</tr>
<?php }?>
</table>
</div>

View File

@ -20,6 +20,7 @@
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
@ -29,6 +30,7 @@
))?>
</td>
</tr>
<?php }?>
<?php if( $this->dirigeantsop ){ ?>
<tr>
<td width="30">&nbsp;</td>
@ -36,8 +38,7 @@
<a href="<?=$this->dirigeantsop?>">Consulter la liste des dirigeants opérationnels</a>
</td>
</tr>
<?php } ?>
<?php } ?>
</table>
</div>
<?php endif;?>

View File

@ -20,6 +20,7 @@
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
@ -29,6 +30,7 @@
))?>
</td>
</tr>
<?php }?>
</table>
</div>
<?php endif;?>

View File

@ -90,6 +90,7 @@
<?=$this->indiscore->Tel?>
</td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30"></td>
<td colspan="2">
@ -99,6 +100,7 @@
));?>
</td>
</tr>
<?php }?>
</table>
</div>

View File

@ -75,6 +75,7 @@
</td>
</tr>
<?php }?>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
@ -84,7 +85,7 @@
))?>
</td>
</tr>
<?php }?>
<?php if ( $this->champType == 'S' ):?>
<tr>
<td colspan="3">Ce bilan a été déposé au format réel simplifié mais vous est livré au format réel normal pour des raisons de standardisation.</td>

View File

@ -40,7 +40,7 @@
<?php endif;?>
</tr>
</table>
</center>
</center>
</div>
<br />
<p id="contact">

View File

@ -26,7 +26,7 @@
<?php endif ?>
</td>
</tr>
<?php if (!empty($this->surveillance)):?>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
@ -36,7 +36,7 @@
))?>
</td>
</tr>
<?php endif;?>
<?php }?>
</table>
</div>

View File

@ -30,6 +30,7 @@
<?php endif ?>
</td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
@ -39,6 +40,7 @@
))?>
</td>
</tr>
<?php }?>
</table>
</div>
<?php endif;?>

View File

@ -17,6 +17,7 @@
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
@ -26,6 +27,7 @@
))?>
</td>
</tr>
<?php }?>
</table>
</div>

View File

@ -17,6 +17,7 @@
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
@ -26,6 +27,7 @@
))?>
</td>
</tr>
<?php }?>
</table>
</div>

View File

@ -56,9 +56,11 @@
<?php
if (count($this->privileges)==0) {
?>
<?php if ($this->surveillance) {?>
<div class="paragraph">
<?=$this->action('infos','surveillance', null, array('siret' => $this->siret, 'source'=>'privileges'))?>
</div>
<?php }?>
<?php
} elseif ($this->detail) {
echo $this->partial('pieces/privileges-details.phtml', array(

View File

@ -17,6 +17,7 @@
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
@ -26,6 +27,7 @@
))?>
</td>
</tr>
<?php }?>
</table>
</div>

View File

@ -164,6 +164,7 @@ class Utilisateur
* Vérifie que l'utilisateur possède bien un droits
* @param string $perm
* Le code de la permission
* @return boolean
*/
public function checkPerm($perm)
{