diff --git a/.env.sample b/.env.sample
index 5c3f1bf8..3058d4ac 100755
--- a/.env.sample
+++ b/.env.sample
@@ -138,3 +138,11 @@ LEAD_CLIENT_FROM_MAIL_ID =
# BDS Daily Report Emails Configuration
bds.dailyReportEmails =
+
+#--------------------------------------------------------------------
+# MEDI ASSIST WELLNESS SSO Configuration
+#--------------------------------------------------------------------
+
+MEDIASSIST_WELLNESS_KEY =
+MEDIASSIST_WELLNESS_IV =
+MEDIASSIST_WELLNESS_LOGIN_URL =
diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index b9988f4a..2325f818 100755
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -451,6 +451,7 @@ $routes->group("/util", ["filter" => "authMVC"], function ($routes) {
$routes->get('croneDailyActivityReport', 'DashboardController::croneDailyActivityReport');
$routes->get('insertSampleTpaApiData/(:any)', 'TestingController::insertSampleTpaApiData/$1');
$routes->get('listEmployeeCountByClientPolicy', 'TestingController::listEmployeeCountByClientPolicy');
+ $routes->get('testMediAssistWellness','TestingController::testMediAssistWellness');
});
$routes->post("policy_tranction/sendInstallmentRemainderMail","PolicyTransactionController::sendInstallmentRemainderMail");
diff --git a/app/Controllers/ApiServiceController.php b/app/Controllers/ApiServiceController.php
index bb977a11..f4782afb 100644
--- a/app/Controllers/ApiServiceController.php
+++ b/app/Controllers/ApiServiceController.php
@@ -425,13 +425,17 @@ class ApiServiceController extends BaseController
$userParams = [];
foreach ($data as $row) {
- if($row['wellness_vendor_id'] != null)
+ if($row['wellness_vendor_id'] == $this->vidal_primary_key)
{
$vidalApiController = new VidalApiController();
return $vidalApiController->getWellnessSSORedirectUrl($row['email']);
+ }else if ($row['wellness_vendor_id'] == $this->medi_assist_primary_key)
+ {
+ $mediAssistController = new MediAssistApiController();
+ return $mediAssistController->getWellnessSSORedirectUrl($row['planId'], $row['memberId']);
}
- else if ($row['planId'] != null) // VISIT
+ else if ($row['planId'] != null && empty($row['wellness_vendor_id'])) // VISIT
{
$userParams['name'] = $row['name'];
$userParams['email'] = $row['email'];
diff --git a/app/Controllers/AppContentManagementController.php b/app/Controllers/AppContentManagementController.php
index e13732b2..a3db36ec 100755
--- a/app/Controllers/AppContentManagementController.php
+++ b/app/Controllers/AppContentManagementController.php
@@ -247,7 +247,7 @@ class AppContentManagementController extends AdminController
'errors' => [
'required' => 'Type is required',
'max_length' => 'Type cannot exceed 255 characters',
- 'regex_match' => 'Type contains invalid characters'
+ 'regex_match' => 'Type can contain only letters, numbers, spaces, _ and -'
]
],
'content_section' => [
@@ -255,7 +255,7 @@ class AppContentManagementController extends AdminController
'errors' => [
'required' => 'Content Section is required',
'max_length' => 'Content Section cannot exceed 255 characters',
- 'regex_match' => 'Content Section contains invalid characters'
+ 'regex_match' => 'Content Section can contain only letters, numbers, spaces, _ and -'
]
],
'heading' => [
@@ -263,7 +263,7 @@ class AppContentManagementController extends AdminController
'errors' => [
'required' => 'Heading is required',
'max_length' => 'Heading cannot exceed 255 characters',
- 'regex_match' => 'Heading contains invalid characters. Only letters, numbers, spaces and basic punctuation are allowed'
+ 'regex_match' => 'Heading can contain only letters, numbers, spaces, and these characters: . , ; : ! ? ( ) & / -'
]
],
'content' => [
@@ -465,18 +465,22 @@ class AppContentManagementController extends AdminController
if ($method === 'post') {
$rules = [
'category' => [
- 'rules' => 'required|max_length[100]|alpha_numeric_space',
+ // Allow letters, numbers, spaces and / - . , " '
+ 'rules' => 'required|max_length[100]|regex_match[/^[a-zA-Z0-9 \\/\\-\\.\,\"\\\']+$/]',
'errors' => [
- 'required' => 'Category is required',
- 'max_length' => 'Category cannot exceed 100 characters',
- 'alpha_numeric_space' => 'Category contains invalid characters'
+ 'required' => 'Category is required',
+ 'max_length' => 'Category cannot exceed 100 characters',
+ 'regex_match' => 'Category can contain only letters, numbers, spaces, and these characters: / - . , " \'',
+
]
],
'question' => [
- 'rules' => 'required|max_length[1000]',
+ // Allow only letters, numbers, spaces and basic punctuation . , ; : ! ? ( ) & / -
+ 'rules' => 'required|max_length[1000]|regex_match[/^[a-zA-Z0-9 _\\-.,;:!?()&\\/]+$/]',
'errors' => [
'required' => 'Question is required',
'max_length' => 'Question cannot exceed 1000 characters',
+ 'regex_match' => 'Question can contain only letters, numbers, spaces, and these characters: . , ; : ! ? ( ) & / -',
]
],
'answer' => [
@@ -779,17 +783,18 @@ class AppContentManagementController extends AdminController
* The `/i` flag makes the search case-insensitive.
*/
$dangerous_patterns = [
- '/<\s*script/i', //
+ '/<\s*object/i', //