Fix test on permissions

This commit is contained in:
Laurent Destailleur
2024-08-31 16:17:03 +02:00
parent 1e3a860767
commit 2c28d039e2
16 changed files with 89 additions and 83 deletions

View File

@@ -650,7 +650,11 @@ class CodingPhpTest extends CommonClassTest
preg_match_all('/if\s*\(\s*\$action\s*==\s*[\'"][a-z]+[\'"].*/', $filecontentaction, $matches, PREG_SET_ORDER);
foreach ($matches as $key => $val) {
if (!preg_match('/\$user->hasR/', $val[0]) && !preg_match('/\$permission/', $val[0]) && !preg_match('/\$usercan/', $val[0])) {
if (!preg_match('/\$user->hasR/', $val[0])
&& !preg_match('/\$permission/', $val[0])
&& !preg_match('/\$usercan/', $val[0])
&& !preg_match('/\$canedit/', $val[0])
&& !preg_match('/already done/', $val[0])) {
$ok = false;
print "Line: ".$val[0]."\n";
break;