File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -284,7 +284,6 @@ function RestoreArchive($id)
284284 $ isSaaSTest = (stripos ($ id , '_saas_ ' ) !== false );
285285 $ saas_capture_prefix = GetSetting ("cp_saas_capture_prefix " );
286286 $ isInstantTest = (stripos ($ id , '_instant_ ' ) !== false );
287- $ isAdmin = isset ($ request_context ) && $ request_context ->getUser ()->isAdmin ();
288287
289288 $ ret = false ;
290289 if (TestArchiveExpired ($ id )) {
@@ -313,7 +312,7 @@ function RestoreArchive($id)
313312 }
314313 }
315314 //saas tests do not specifiy capture server in the URL, so we'll hardcode it
316- if ($ isSaaSTest || ( $ isInstantTest && $ isAdmin ) ) {
315+ if ($ isSaaSTest || $ isInstantTest ) {
317316 $ capture_server = GetSetting ("cp_capture_ $ saas_capture_prefix " );
318317 $ capture_salt = GetSetting ("cp_capture_salt_ $ saas_capture_prefix " );
319318 }
@@ -421,7 +420,7 @@ function RestoreArchive($id)
421420 if ($ deleteZip ) {
422421 @unlink ($ zipfile );
423422 }
424- if ($ isInstantTest && $ isAdmin ) {
423+ if ($ isInstantTest ) {
425424 ProcessUploadedTest ($ id );
426425 }
427426 }
Original file line number Diff line number Diff line change @@ -455,11 +455,6 @@ if (strlen($id)) {
455455 throw new ForbiddenException ();
456456 }
457457
458- $ test_is_instant = (stripos ($ id , '_instant_ ' ) !== false );
459- if ($ test_is_instant && !(isset ($ request_context ) && $ request_context ->getUser ()->isAdmin ())) {
460- throw new ForbiddenException ();
461- }
462-
463458 $ url = array_key_exists ('url ' , $ test ['testinfo ' ]) ? htmlspecialchars ($ test ['testinfo ' ]['url ' ]) : null ;
464459 $ dom = array_key_exists ('domElement ' , $ test ['testinfo ' ]) ? htmlspecialchars ($ test ['testinfo ' ]['domElement ' ]) : null ;
465460 $ login = array_key_exists ('login ' , $ test ['testinfo ' ]) ? htmlspecialchars ($ test ['testinfo ' ]['login ' ]) : null ;
Original file line number Diff line number Diff line change @@ -16,12 +16,6 @@ $testInfoJson = null;
1616function GetTestStatus ($ id , $ includePosition = true )
1717{
1818 global $ request_context ;
19- $ isInstantTest = (stripos ($ id , '_instant_ ' ) !== false );
20- $ isAdmin = isset ($ request_context ) && $ request_context ->getUser ()->isAdmin ();
21- if ($ isInstantTest && !$ isAdmin ) {
22- return array ('statusCode ' => 400 , 'statusText ' => 'Test not found ' , 'id ' => $ id );
23- }
24-
2519 $ testServer = GetServerForTest ($ id );
2620 if (isset ($ testServer )) {
2721 // Proxy the status through the server that actually owns the test
You can’t perform that action at this time.
0 commit comments