Commit a793d6f5 authored by Tibor Katelbach's avatar Tibor Katelbach
Browse files

Merge remote-tracking branch 'origin/development' into development

parents d413691f c9b8bf49
......@@ -642,7 +642,7 @@ class Form {
$res = array("render"=>"co2.views.default.unTpl", "msg"=>Yii::t("project", "Source Copy doesn't exist."),"icon"=>"fa-lock");
return $res;
}
public static function canFormAccess($rules, $formParents=null){
public static function canAccess($rules, $formParents=null){
//WARNING la c'est ce qui est lier à l'user du costum connecté
if(Authorisation::isInterfaceAdmin())
return true;
......@@ -690,7 +690,7 @@ class Form {
if(isset($form["rules"])){
foreach ($form["subForms"] as $k => $value) {
if(isset($form["rules"][$value])){
if(!self::canFormAccess($form["rules"][$value], $form["parent"])){
if(!self::canAccess($form["rules"][$value], $form["parent"])){
array_splice($params["parentForm"]["subForms"], $k, -1);
}
}
......
......@@ -3,7 +3,7 @@
// role is financer or operater
if( $mode != "pdf" ){
if(Form::canFormAccess(['roles'=>["Financeur","Opérateur"] ])){
if(Form::canAccess(['roles'=>["Financeur","Opérateur"] ])){
$isFinanceur=false;
if(Authorisation::isInterfaceAdmin())
$isFinanceur=true;
......
<?php
if( $mode != "pdf" ){
//if( Form::canFormAccess( ['roles'=>["Financeur"] ], @$parentForm["parent"]) ){
//if( Form::canAccess( ['roles'=>["Financeur"] ], @$parentForm["parent"]) ){
if( !empty($canAdminAnswer) && $canAdminAnswer === true ){
if( isset($form['id']) )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment