fix cs + read remote calendar based on user access

This commit is contained in:
2022-05-09 13:36:59 +02:00
parent 811798e23f
commit 8abce5ab85
17 changed files with 189 additions and 115 deletions

View File

@@ -15,7 +15,6 @@ use Chill\CalendarBundle\Synchro\Connector\MSGraph\MachineTokenStorage;
use KnpU\OAuth2ClientBundle\Client\ClientRegistry;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;
use TheNetworg\OAuth2\Client\Provider\Azure;

View File

@@ -1,10 +1,17 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\CalendarBundle\Command;
use Chill\CalendarBundle\Synchro\Connector\MSGraph\MachineTokenStorage;
use Chill\CalendarBundle\Synchro\Connector\MSGraph\MapCalendarToUser;
use Chill\CalendarBundle\Synchro\Connector\MSGraphRemoteCalendarConnector;
use Chill\MainBundle\Repository\UserRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Console\Command\Command;
@@ -39,7 +46,7 @@ class MapUserCalendarCommand extends Command
foreach ($users as $user) {
$this->mapCalendarToUser->writeMetadata($user);
$offset++;
++$offset;
}
$this->em->flush();