Merged in bugfix/HOR-3279 (pull request #5688)
HOR-3279 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
3e26db71f5
@@ -29,6 +29,18 @@ class Designer extends Controller
|
||||
$client = $this->getClientCredentials();
|
||||
|
||||
if (isset($httpData->tracker_designer) && $httpData->tracker_designer == 1) {
|
||||
try {
|
||||
if (!isset($_SESSION['CASE']) && !isset($_SESSION['PIN'])) {
|
||||
throw (new \Exception(
|
||||
\G::LoadTranslation('ID_CASE_NOT_EXISTS') . "\n" . \G::LoadTranslation('ID_PIN_INVALID')
|
||||
));
|
||||
}
|
||||
\ProcessMaker\BusinessModel\Light\Tracker::authentication($_SESSION['CASE'], $_SESSION['PIN']);
|
||||
} catch (\Exception $e) {
|
||||
Bootstrap::registerMonolog('CaseTracker', 400, $e->getMessage(), [], SYS_SYS, 'processmaker.log');
|
||||
\G::header('Location: /errors/error403.php');
|
||||
die();
|
||||
}
|
||||
$client["tracker_designer"] = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@ class Tracker
|
||||
}
|
||||
|
||||
/**
|
||||
* authenticaction for case tracker
|
||||
* Authentication for case tracker
|
||||
*
|
||||
* @param $case numbre case
|
||||
* @param $pin code pin access for case tracek
|
||||
* @param int $case number case
|
||||
* @param int $pin code pin access for case track
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function authentication($case, $pin)
|
||||
public static function authentication($case, $pin)
|
||||
{
|
||||
$cases = new \Cases();
|
||||
$response = array();
|
||||
|
||||
@@ -21,8 +21,7 @@ class Tracker extends Api
|
||||
public function Authentication($case, $pin)
|
||||
{
|
||||
try {
|
||||
$oMobile = new \ProcessMaker\BusinessModel\Light\Tracker();
|
||||
$response = $oMobile->authentication($case, $pin);
|
||||
$response = \ProcessMaker\BusinessModel\Light\Tracker::authentication($case, $pin);
|
||||
} catch (\Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user