mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 10:23:17 +00:00
masquing some native Api application in user porfil -> Application tab
This commit is contained in:
@@ -215,15 +215,23 @@ class AccountController extends Controller
|
|||||||
{
|
{
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
|
$nativeApp = [
|
||||||
|
\API_OAuth2_Application_Navigator::CLIENT_NAME,
|
||||||
|
\API_OAuth2_Application_OfficePlugin::CLIENT_NAME,
|
||||||
|
\API_OAuth2_Application_AdobeCCPlugin::CLIENT_NAME,
|
||||||
|
];
|
||||||
|
|
||||||
$user = $this->getAuthenticatedUser();
|
$user = $this->getAuthenticatedUser();
|
||||||
foreach (
|
foreach (
|
||||||
$this->getApiApplicationRepository()->findByUser($user) as $application) {
|
$this->getApiApplicationRepository()->findByUser($user) as $application) {
|
||||||
$account = $this->getApiAccountRepository()->findByUserAndApplication($user, $application);
|
$account = $this->getApiAccountRepository()->findByUserAndApplication($user, $application);
|
||||||
|
|
||||||
$data[$application->getId()] = [
|
if(!in_array($application->getName(), $nativeApp)){
|
||||||
'application' => $application,
|
$data[$application->getId()] = [
|
||||||
'user-account' => $account,
|
'application' => $application,
|
||||||
];
|
'user-account' => $account,
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('account/authorized_apps.html.twig', [
|
return $this->render('account/authorized_apps.html.twig', [
|
||||||
|
|||||||
Reference in New Issue
Block a user