HOR-3279
This commit is contained in:
@@ -29,6 +29,14 @@ class Designer extends Controller
|
|||||||
$client = $this->getClientCredentials();
|
$client = $this->getClientCredentials();
|
||||||
|
|
||||||
if (isset($httpData->tracker_designer) && $httpData->tracker_designer == 1) {
|
if (isset($httpData->tracker_designer) && $httpData->tracker_designer == 1) {
|
||||||
|
try {
|
||||||
|
$response = \ProcessMaker\BusinessModel\Light\Tracker::authentication($_SESSION['CASE'], $_SESSION['PIN']);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
G::header('Location: /errors/error403.php');
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
$httpData->prj_uid = $response['process'];
|
||||||
|
$httpData->app_uid = $response['app_uid'];
|
||||||
$client["tracker_designer"] = 1;
|
$client["tracker_designer"] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ class Tracker
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* authenticaction for case tracker
|
* Authentication for case tracker
|
||||||
*
|
*
|
||||||
* @param $case numbre case
|
* @param int $case number case
|
||||||
* @param $pin code pin access for case tracek
|
* @param int $pin code pin access for case track
|
||||||
* @return array
|
* @return array
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function authentication($case, $pin)
|
public static function authentication($case, $pin)
|
||||||
{
|
{
|
||||||
$cases = new \Cases();
|
$cases = new \Cases();
|
||||||
$response = array();
|
$response = array();
|
||||||
|
|||||||
@@ -21,8 +21,7 @@ class Tracker extends Api
|
|||||||
public function Authentication($case, $pin)
|
public function Authentication($case, $pin)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$oMobile = new \ProcessMaker\BusinessModel\Light\Tracker();
|
$response = \ProcessMaker\BusinessModel\Light\Tracker::authentication($case, $pin);
|
||||||
$response = $oMobile->authentication($case, $pin);
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user