Skip to content

Commit

Permalink
some updates for changlog and other updates
Browse files Browse the repository at this point in the history
  • Loading branch information
papnoisanjeev committed Jan 3, 2025
1 parent 941a10a commit 32d4075
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 62 deletions.
15 changes: 7 additions & 8 deletions CHANGELOG-1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ CHANGELOG for 1.1.x

This changelog references any relevant changes introduced in 1.1 minor versions.

* 1.1.7
* 1.1.7 (2025-01-03)
* Features & Enhancements:
- Microsoft modern app support added (For Mailbox).
- Added Marketing module.
- Added OTP option for customers to login.
- Round robin ticket assignment.
- Microsoft modern app support added.
- Added a New language he (Hebrew).
- Default read/write permission added for some required files during install.
- Added option for selecting and save country for ticket.
- Showing customer email along with name in side filters ticket list. (To avoid confusion in case multiple customers name same).
- Showing customer email along with name in side filters ticket list. (To avoid confusion in case multiple customers having same name).
- Attachments renaming true so actual name will not show (For security purpose).
- In case of multiple attachments with ticket reply now added cross button for each attachment, So that user can remove a particular attachment before reply instead of removing all with single button.
- Made updates in installation part.
- Refactoring on code end.
- Made updates in installation part (for database connection related issues)
- Refactoring on code end for main and other dependent repository.

* Issue Fixes:

#### Issue Fixed in * [**Core Framework**][1]

- Issue #508 #549 - Filter issue resolved for customer filtering.
- Issue #552 - In agent activity option: date filter should be select correct date format.
- Issue #524 - ticket is in trashed folder and we will reply from the admin then it should not send mail to the customer.
Expand All @@ -43,7 +43,6 @@ This changelog references any relevant changes introduced in 1.1 minor versions.
- Lang select snippets position issue resolved on dashboard.

#### Issue Fixed in * [**support-center-bundle**][2]

- Issue #538 - Tag line is not translated in other languages except the english.
- Made required message field in ticket creation form on front end.
- Issue #228 - front website cookies policy Popup issue if switch language in arabic.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LABEL maintainer="[email protected]"

ENV GOSU_VERSION=1.11

# Install base supplimentary packages
# Install base supplementary packages
RUN apt-get update && apt-get -y upgrade \
&& apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:ondrej/php \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0",
"uvdesk/api-bundle": "^1.1",
"uvdesk/automation-bundle": "^1.1.2",
"uvdesk/core-framework": "^1.1.5",
"uvdesk/extension-framework": "^1.1",
"uvdesk/mailbox-component": "^1.1",
"uvdesk/automation-bundle": "^1.1.3",
"uvdesk/core-framework": "^1.1.6",
"uvdesk/extension-framework": "^1.1.2",
"uvdesk/mailbox-component": "^1.1.4",
"uvdesk/support-center-bundle": "^1.1.3",
"intervention/image": "^2.4",
"intervention/imagecache": "^2.5.2"
Expand Down
14 changes: 10 additions & 4 deletions src/Controller/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,36 @@ public function base(EntityManagerInterface $entityManager, KernelInterface $ker
$ownerSupportRole = $entityManager->getRepository(SupportRole::class)->findOneByCode('ROLE_SUPER_ADMIN');
$administratorSupportRole = $entityManager->getRepository(SupportRole::class)->findOneByCode('ROLE_ADMIN');

if (!empty($ownerSupportRole) || !empty($administratorSupportRole)) {
if (
! empty($ownerSupportRole)
|| ! empty($administratorSupportRole)
) {
$userInstanceRepository = $entityManager->getRepository(UserInstance::class);

// If support roles are present, we'll check if any users exists with the administrator role.
$owners = $userInstanceRepository->findBySupportRole($ownerSupportRole);
$administrators = $userInstanceRepository->findBySupportRole($administratorSupportRole);

if (!empty($owners) || !empty($administrators)) {
if (
! empty($owners)
|| ! empty($administrators)
) {
$availableBundles = array_keys($kernel->getBundles());
$websiteRepository = $entityManager->getRepository(Website::class);

// Redirect user to front panel
if (in_array('UVDeskSupportCenterBundle', $availableBundles)) {
$supportCenterWebsite = $websiteRepository->findOneByCode('knowledgebase');

if (!empty($supportCenterWebsite)) {
if (! empty($supportCenterWebsite)) {
return $this->redirectToRoute('helpdesk_knowledgebase', [], 301);
}
}

// Redirect user to back panel
$helpdeskWebsite = $websiteRepository->findOneByCode('helpdesk');

if (!empty($helpdeskWebsite)) {
if (! empty($helpdeskWebsite)) {
return $this->redirectToRoute('helpdesk_member_handle_login');
}
}
Expand Down
81 changes: 42 additions & 39 deletions src/Controller/ConfigureHelpdesk.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function evaluateSystemRequirements(Request $request, KernelInterface $ke
switch (strtolower($request->request->get('specification'))) {
case 'php-version':
$response = [
'status' => version_compare(phpversion(), '7.0.0', '<') ? false : true,
'status' => version_compare(phpversion(), '7.0.0', '<') ? false : true,
'version' => sprintf('%s.%s.%s', PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION),
];

Expand Down Expand Up @@ -145,10 +145,10 @@ public function verifyDatabaseCredentials(Request $request)

try {
$connectionUrl = strtr(self::DB_URL_TEMPLATE, [
'[host]' => $request->request->get('serverName'),
'[port]' => $request->request->get('serverPort'),
'[user]' => $request->request->get('username'),
'[password]' => $request->request->get('password'),
'[host]' => $request->request->get('serverName'),
'[port]' => $request->request->get('serverPort'),
'[user]' => $request->request->get('username'),
'[password]' => $request->request->get('password'),
]);

if ($request->request->get('serverVersion') != null) {
Expand All @@ -169,26 +169,29 @@ public function verifyDatabaseCredentials(Request $request)
// Check if database exists
$createDatabase = (bool) $request->request->get('createDatabase');

if (!in_array($request->request->get('database'), $databaseConnection->getSchemaManager()->listDatabases()) && false == $createDatabase) {
if (
! in_array($request->request->get('database'), $databaseConnection->getSchemaManager()->listDatabases())
&& false == $createDatabase
) {
return new JsonResponse([
'status' => false,
'status' => false,
'message' => "The requested database was not found."
]);
}

// Storing database configuration to session.
$_SESSION['DB_CONFIG'] = [
'host' => $request->request->get('serverName'),
'port' => $request->request->get('serverPort'),
'version' => $request->request->get('serverVersion'),
'username' => $request->request->get('username'),
'password' => $request->request->get('password'),
'database' => $request->request->get('database'),
'host' => $request->request->get('serverName'),
'port' => $request->request->get('serverPort'),
'version' => $request->request->get('serverVersion'),
'username' => $request->request->get('username'),
'password' => $request->request->get('password'),
'database' => $request->request->get('database'),
'createDatabase' => $createDatabase,
];
} catch (\Exception $e) {
return new JsonResponse([
'status' => false,
'status' => false,
'message' => "Failed to establish a connection with database server."
]);
}
Expand All @@ -205,8 +208,8 @@ public function prepareSuperUserDetailsXHR(Request $request)
// unset($_SESSION['USER_DETAILS']);

$_SESSION['USER_DETAILS'] = [
'name' => $request->request->get('name'),
'email' => $request->request->get('email'),
'name' => $request->request->get('name'),
'email' => $request->request->get('email'),
'password' => $request->request->get('password'),
];

Expand All @@ -219,24 +222,24 @@ public function updateConfigurationsXHR(Request $request, KernelInterface $kerne
session_start();
}

$database_host = $_SESSION['DB_CONFIG']['host'];
$database_port = $_SESSION['DB_CONFIG']['port'];
$database_host = $_SESSION['DB_CONFIG']['host'];
$database_port = $_SESSION['DB_CONFIG']['port'];
$database_version = $_SESSION['DB_CONFIG']['version'];
$database_user = $_SESSION['DB_CONFIG']['username'];
$database_pass = $_SESSION['DB_CONFIG']['password'];
$database_name = $_SESSION['DB_CONFIG']['database'];
$database_user = $_SESSION['DB_CONFIG']['username'];
$database_pass = $_SESSION['DB_CONFIG']['password'];
$database_name = $_SESSION['DB_CONFIG']['database'];

$create_database = $_SESSION['DB_CONFIG']['createDatabase'];

try {
$connectionUrl = strtr(self::DB_URL_TEMPLATE, [
'[host]' => $database_host,
'[port]' => $database_port,
'[user]' => $database_user,
'[password]' => $database_pass,
'[host]' => $database_host,
'[port]' => $database_port,
'[user]' => $database_user,
'[password]' => $database_pass,
]);

if (!empty($database_version)) {
if (! empty($database_version)) {
$connectionUrl .= "?serverVersion=$database_version";
}

Expand All @@ -252,7 +255,7 @@ public function updateConfigurationsXHR(Request $request, KernelInterface $kerne
}

// Check if database exists
if (!in_array($database_name, $databaseConnection->getSchemaManager()->listDatabases())) {
if (! in_array($database_name, $databaseConnection->getSchemaManager()->listDatabases())) {
if (false == $create_database) {
throw new \Exception('Database does not exist.');
}
Expand All @@ -262,11 +265,11 @@ public function updateConfigurationsXHR(Request $request, KernelInterface $kerne
}

$connectionUrl = strtr(self::DB_URL_TEMPLATE . "/[database]", [
'[host]' => $database_host,
'[port]' => $database_port,
'[user]' => $database_user,
'[password]' => $database_pass,
'[database]' => $database_name,
'[host]' => $database_host,
'[port]' => $database_port,
'[user]' => $database_user,
'[password]' => $database_pass,
'[database]' => $database_name,
]);

if (!empty($database_version)) {
Expand All @@ -279,16 +282,16 @@ public function updateConfigurationsXHR(Request $request, KernelInterface $kerne

$returnCode = $application->run(new ArrayInput([
'command' => 'uvdesk_wizard:env:update',
'name' => 'DATABASE_URL',
'value' => $connectionUrl
'name' => 'DATABASE_URL',
'value' => $connectionUrl
]), new NullOutput());

if (0 === $returnCode) {
return new JsonResponse(['success' => true]);
}
} catch (\Exception $e) {
return new JsonResponse([
'status' => false,
'status' => false,
'message' => "An unexpected error occurred: " . $e->getMessage(),
]);
}
Expand All @@ -314,7 +317,7 @@ public function populateDatabaseEntitiesXHR(Request $request, KernelInterface $k
$application->setAutoExit(false);

$resultCode = $application->run(new ArrayInput([
'command' => 'doctrine:fixtures:load',
'command' => 'doctrine:fixtures:load',
'--append' => true,
]), new NullOutput());

Expand All @@ -332,7 +335,7 @@ public function createDefaultSuperUserXHR(Request $request, UserPasswordEncoderI

$role = $entityManager->getRepository(SupportRole::class)->findOneByCode('ROLE_SUPER_ADMIN');
$userInstance = $entityManager->getRepository(UserInstance::class)->findOneBy([
'isActive' => true,
'isActive' => true,
'supportRole' => $role,
]);

Expand Down Expand Up @@ -361,7 +364,7 @@ public function createDefaultSuperUserXHR(Request $request, UserPasswordEncoderI

$user
->setFirstName($username[0])
->setLastName(!empty($username[1]) ? $username[1] : '')
->setLastName(! empty($username[1]) ? $username[1] : '')
->setPassword($encodedPassword)
->setIsEnabled(true);

Expand Down Expand Up @@ -404,7 +407,7 @@ public function websiteConfigurationXHR(Request $request, UVDeskService $uvdesk)
}

$_SESSION['PREFIXES_DETAILS'] = [
'member' => $request->request->get('member-prefix'),
'member' => $request->request->get('member-prefix'),
'customer' => $request->request->get('customer-prefix'),
];

Expand Down
12 changes: 6 additions & 6 deletions src/EventListener/ExceptionSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public function onKernelException(ExceptionEvent $event)

if (!empty($this->container->get('security.token_storage')->getToken()->getUser()) && $this->container->get('security.token_storage')->getToken()->getUser() != "anon.") {
$template = $this->twig->render('errors/error.html.twig', [
'code' => 403,
'message' => 'Access Forbidden',
'code' => 403,
'message' => 'Access Forbidden',
'description' => 'You are not authorized to access this page.',
]);

Expand All @@ -60,16 +60,16 @@ public function onKernelException(ExceptionEvent $event)
} else {
if ($exception instanceof NotFoundHttpException || $exception->getCode() == 404) {
$template = $this->twig->render('errors/error.html.twig', [
'code' => 404,
'message' => 'Page not Found',
'code' => 404,
'message' => 'Page not Found',
'description' => 'We were not able to find the page you are looking for.',
]);

$event->setResponse(new Response($template, 404));
} else {
$template = $this->twig->render('errors/error.html.twig', [
'message' => 'Internal Server Error',
'code' => 500,
'message' => 'Internal Server Error',
'code' => 500,
'description' => 'Something has gone wrong on the server. Please try again later.',
]);

Expand Down

0 comments on commit 32d4075

Please sign in to comment.