From 4f996f3cccd24997c0c35badc62eb3f6c24770c0 Mon Sep 17 00:00:00 2001 From: aina-esokia Date: Mon, 23 Jul 2018 11:53:18 +0400 Subject: [PATCH] masquing some native Api application in user porfil -> Application tab --- .../Controller/Root/AccountController.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Root/AccountController.php b/lib/Alchemy/Phrasea/Controller/Root/AccountController.php index 87bcbdc721..8f9107f83a 100644 --- a/lib/Alchemy/Phrasea/Controller/Root/AccountController.php +++ b/lib/Alchemy/Phrasea/Controller/Root/AccountController.php @@ -215,15 +215,23 @@ class AccountController extends Controller { $data = []; + $nativeApp = [ + \API_OAuth2_Application_Navigator::CLIENT_NAME, + \API_OAuth2_Application_OfficePlugin::CLIENT_NAME, + \API_OAuth2_Application_AdobeCCPlugin::CLIENT_NAME, + ]; + $user = $this->getAuthenticatedUser(); foreach ( $this->getApiApplicationRepository()->findByUser($user) as $application) { $account = $this->getApiAccountRepository()->findByUserAndApplication($user, $application); - $data[$application->getId()] = [ - 'application' => $application, - 'user-account' => $account, - ]; + if(!in_array($application->getName(), $nativeApp)){ + $data[$application->getId()] = [ + 'application' => $application, + 'user-account' => $account, + ]; + } } return $this->render('account/authorized_apps.html.twig', [