Compare commits

..

No commits in common. "0c099b07844d86e7feefac24b1fce0331850febc" and "99f29975d830d210d82cc406dc780cee822ce901" have entirely different histories.

10 changed files with 55 additions and 98 deletions

View File

@ -26,6 +26,7 @@
<variables> <variables>
<family name='Ninegate'> <family name='Ninegate'>
<variable name="activer_eportail" type="oui/non" description="Activer ePortail" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_limesurvey" type="oui/non" description="Activer Limesurvey" hidden='True' exists='False'><value>non</value></variable> <variable name="activer_limesurvey" type="oui/non" description="Activer Limesurvey" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_moodle" type="oui/non" description="Activer Moodle" hidden='True' exists='False'><value>non</value></variable> <variable name="activer_moodle" type="oui/non" description="Activer Moodle" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_nextcloud" type="oui/non" description="Activer Nextcloud" hidden='True' exists='False'><value>non</value></variable> <variable name="activer_nextcloud" type="oui/non" description="Activer Nextcloud" hidden='True' exists='False'><value>non</value></variable>
@ -52,6 +53,7 @@
<variable type='string' name='ninegate_api_key' description="Clé d'accès API" mandatory='True'><value>APIKeyNinegate</value></variable> <variable type='string' name='ninegate_api_key' description="Clé d'accès API" mandatory='True'><value>APIKeyNinegate</value></variable>
<variable type='oui/non' name='ninegate_syncldap' description="Synchroniser Ninegate vers votre annuaire"><value>non</value></variable> <variable type='oui/non' name='ninegate_syncldap' description="Synchroniser Ninegate vers votre annuaire"><value>non</value></variable>
<variable type='oui/non' name='ninegate_synceportail' description="Synchroniser Ninegate vers ePortail"><value>non</value></variable>
<variable type='string' name='ninegate_ldaptemplate' description="Modèle d'annuaire"><value>scribe</value></variable> <variable type='string' name='ninegate_ldaptemplate' description="Modèle d'annuaire"><value>scribe</value></variable>
<variable type='string' name='ninegate_pwdadmin' description="Mot de passe du compte admin durant l'instance (idem valeur Cadoles ldap)" mandatory='True'><value>cadoles</value></variable> <variable type='string' name='ninegate_pwdadmin' description="Mot de passe du compte admin durant l'instance (idem valeur Cadoles ldap)" mandatory='True'><value>cadoles</value></variable>
@ -221,6 +223,11 @@
<target type='variable'>activer_ninegate</target> <target type='variable'>activer_ninegate</target>
</condition> </condition>
<condition name='hidden_if_in' source='activer_eportail'>
<param>non</param>
<target type='variable'>ninegate_synceportail</target>
</condition>
<condition name='hidden_if_in' source='activer_ninegate'> <condition name='hidden_if_in' source='activer_ninegate'>
<param>non</param> <param>non</param>
@ -230,6 +237,7 @@
<target type='variable'>ninegate_syncldap</target> <target type='variable'>ninegate_syncldap</target>
<target type='variable'>ninegate_synceportail</target>
<target type='variable'>ninegate_ldaptemplate</target> <target type='variable'>ninegate_ldaptemplate</target>
<target type='variable'>ninegate_pwdadmin</target> <target type='variable'>ninegate_pwdadmin</target>
@ -287,6 +295,7 @@
<param>SSO</param> <param>SSO</param>
<target type='variable'>ninegate_syncldap</target> <target type='variable'>ninegate_syncldap</target>
<target type='variable'>ninegate_synceportail</target>
<target type='variable'>ninegate_moderegistration</target> <target type='variable'>ninegate_moderegistration</target>
<target type='variable'>ninegate_keyterm</target> <target type='variable'>ninegate_keyterm</target>
</condition> </condition>

View File

@ -155,7 +155,7 @@ ivory_ck_editor:
language: fr language: fr
toolbar: "my_toolbar_1" toolbar: "my_toolbar_1"
uiColor: "#ffffff" uiColor: "#ffffff"
extraPlugins: ["html5video","pastebase64"] extraPlugins: ["html5video"]
light_config: light_config:
language: fr language: fr
toolbar: "my_toolbar_2" toolbar: "my_toolbar_2"

View File

@ -40,7 +40,7 @@
"symfony/symfony": "3.4.*", "symfony/symfony": "3.4.*",
"tetranz/select2entity-bundle": "2.*", "tetranz/select2entity-bundle": "2.*",
"thecsea/simple-caldav-client": "^0.1.10", "thecsea/simple-caldav-client": "^0.1.10",
"mashape/unirest-php": "3.*", "mashape/unirest-php": "2.*",
"twig/twig": "^1.0||^2.0" "twig/twig": "^1.0||^2.0"
}, },
"require-dev": { "require-dev": {

View File

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "e008822a96a469e24963e22d66f34c98", "hash": "5c29a0c1698bd753d6b42df4822e5f2d",
"content-hash": "589f314a10ca56596cf580254885bd7c", "content-hash": "51482d6b9f9c27b385c17393182e0d82",
"packages": [ "packages": [
{ {
"name": "cboden/ratchet", "name": "cboden/ratchet",
@ -2409,33 +2409,31 @@
}, },
{ {
"name": "mashape/unirest-php", "name": "mashape/unirest-php",
"version": "v3.0.4", "version": "v2.6.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Mashape/unirest-php.git", "url": "https://github.com/Mashape/unirest-php.git",
"reference": "842c0f242dfaaf85f16b72e217bf7f7c19ab12cb" "reference": "73c2d903232bb5a125396e606b67314a87b8b21c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Mashape/unirest-php/zipball/842c0f242dfaaf85f16b72e217bf7f7c19ab12cb", "url": "https://api.github.com/repos/Mashape/unirest-php/zipball/73c2d903232bb5a125396e606b67314a87b8b21c",
"reference": "842c0f242dfaaf85f16b72e217bf7f7c19ab12cb", "reference": "73c2d903232bb5a125396e606b67314a87b8b21c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-curl": "*", "ext-curl": "*",
"ext-json": "*",
"php": ">=5.4.0" "php": ">=5.4.0"
}, },
"require-dev": { "require-dev": {
"codeclimate/php-test-reporter": "0.1.*", "codeclimate/php-test-reporter": "0.1.*",
"phpunit/phpunit": "~4.4" "phpunit/phpunit": "~4.4"
}, },
"suggest": {
"ext-json": "Allows using JSON Bodies for sending and parsing requests"
},
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-0": { "psr-0": {
"Unirest\\": "src/" "Unirest": "src"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -2451,7 +2449,7 @@
"https", "https",
"rest" "rest"
], ],
"time": "2016-08-11 17:49:21" "time": "2016-02-16 16:45:52"
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",

View File

@ -8,7 +8,6 @@ use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Finder\Finder; use Symfony\Component\Finder\Finder;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\HttpFoundation\Response;
use Doctrine\DBAL\Connection as DBALConnection; use Doctrine\DBAL\Connection as DBALConnection;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManager;
@ -25,7 +24,6 @@ use Unirest\Request;
global $bdd01; global $bdd01;
global $config; global $config;
class OnlyCommand extends Command class OnlyCommand extends Command
{ {
private $container; private $container;
@ -85,21 +83,26 @@ class OnlyCommand extends Command
$this->only_sync = true; $this->only_sync = true;
$this->only_url = "https://transnum.oo.pp.ac-dijon.fr"."/api/2.0/"; $this->only_url = "https://transnum.oo.pp.ac-dijon.fr"."/api/2.0/";
$this->only_url = "https://transnum.oo.ac-dijon.fr"."/api/2.0/";
$this->only_user = "admin"; $this->only_user = "admin";
$this->only_password = "brigitte89!"; $this->only_password = "brigitte89!";
$im = new \Imagick();
$im->setResolution(350, 350);
$im->readImage("/var/www/html/ninegate/uploads/file/widget-308/essai.csv[0]");
$im->setImageBackgroundColor('#ffffff');
$im = $im->flattenImages();
$im->setImageFormat('jpeg');
$im->writeImage("/var/www/html/ninegate/uploads/file/widget-308/toto.jpg");
return 1;
if($this->only_sync) { if($this->only_sync) {
//$client= new curl();
// Only Office est-il dans le domaine // Only Office est-il dans le domaine
if(stripos($this->only_url,"/")===0) if(stripos($this->only_url,"/")===0)
$this->only_url="https://".$this->container->getParameter("weburl").$this->only_url; $this->only_url="https://".$this->container->getParameter("weburl").$this->only_url;
$indomaine = (stripos($this->only_url,$this->container->getParameter("weburl"))!==false); $indomaine = (stripos($this->only_url,$this->container->getParameter("weburl"))!==false);
// Si hors domaine on utilise le proxy si proxy il y a // Si hors domaine on utilise le proxy si proxy il y a
if(!$indomaine) { if(!$indomaine) {
$PROXYactivate = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYactivate")->getValue(); $PROXYactivate = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYactivate")->getValue();
if($PROXYactivate) { if($PROXYactivate) {
@ -108,66 +111,18 @@ class OnlyCommand extends Command
\Unirest\Request::proxy($PROXYserver, $PROXYport, CURLPROXY_HTTP, true); \Unirest\Request::proxy($PROXYserver, $PROXYport, CURLPROXY_HTTP, true);
} }
} }
// Authentification à onlyoffice // Récupération des informations utilisateurs issus du masteridentity
$this->writeln(''); $headers = ['Accept' => 'application/json'];
$this->writeln('== AUTHENTIFICATION =================================');
\Unirest\Request::verifyPeer(false);
\Unirest\Request::verifyHost(false);
$headers = ['Host' => 'transnum.oo.ac-dijon.fr', 'Accept' => 'application/json','Content-Type'=>'application/json'];
$query = array('userName' => $this->only_user, 'password' => $this->only_password); $query = array('userName' => $this->only_user, 'password' => $this->only_password);
$body = \Unirest\Request\Body::json($query); $body = json_encode($query);
$response = \Unirest\Request::post($this->only_url.'/authentication',$headers,$body);
$response = \Unirest\Request::post($this->only_url.'/authentication',$headers,$body);
if($this->koresponse($response)) return 0;
$token=$response->body->response->token;
$headers["Authorization"]=$token;
// Synchronisation des utilisateur Only sur l'annuaire
$this->writeln('');
$this->writeln('== SYNCHRONISATION ONLY==============================');
//$response = \Unirest\Request::get($this->only_url.'/settings/ldap/sync',$headers);
//if($this->koresponse($response)) return 0;
// Controler les utilisateur only
$this->writeln('');
$this->writeln('== CONTROLE USER ONLY================================');
$response = \Unirest\Request::get($this->only_url.'/people',$headers);
if($this->koresponse($response)) return 0;
foreach($response->body->response as $onlyuser) {
$user=$this->em->getRepository("CadolesCoreBundle:User")->findBy(["username"=>$onlyuser->userName]);
if(!$user) {
$this->writelnred("ERREUR ".$onlyuser->userName." existe dans OnlyOffice mais pas dans Ninegate");
}
}
// Controler les utilisateurs ninegate
$this->writeln('');
$this->writeln('== CONTROLE USER NINEGATE============================');
$users=$this->em->getRepository("CadolesCoreBundle:User")->findAll();
foreach($users as $user) {
$response = \Unirest\Request::get($this->only_url.'/people/'.$user->getUsername(),$headers);
if($this->koresponse($response)) {
$this->writelnred("ERREUR ".$user->getUsername()." existe dans Ninegate mais pas dans OnlyOffice");
}
}
} }
$this->writeln(''); $this->writeln('');
return 1; return 1;
} }
function koresponse($response) {
if($response->code>=Response::HTTP_BAD_REQUEST) {
$this->writelnred("ERREUR ".$response->code);
if(property_exists($response,"body") && property_exists($response->body,"error")) $this->writelnred("ERREUR ".$response->body->error->message);;
return true;
}
return false;
}
private function writelnred($string) { private function writelnred($string) {
$this->output->writeln('<fg=red>'.$string.'</>'); $this->output->writeln('<fg=red>'.$string.'</>');
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n"); $this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");

View File

@ -8,7 +8,7 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
(-100, 'Interne', 'SIREN'); (-100, 'Interne', 'SIREN');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}lq8Ffm9MG+azcCnLde4qj0KU0j3XFO8/ (-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}oIZgb8jC4L72wg4rgK+xfzdfPiy2Z8BA
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple'); ', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');

View File

@ -702,8 +702,8 @@ class InitDataCommand extends ContainerAwareCommand
$entityWidget->setDescription("Conversation instantanée"); $entityWidget->setDescription("Conversation instantanée");
$entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_chat"); $entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_chat");
$entityWidget->setHeight("1000"); $entityWidget->setHeight("1000");
$entityWidget->setAutoajust(true); $entityWidget->setAutoajust(false);
$entityWidget->setBorder(false); $entityWidget->setBorder(true);
$entityWidget->setOpened(true); $entityWidget->setOpened(true);
$entityWidget->setAccess(["config","user","group"]); $entityWidget->setAccess(["config","user","group"]);
$parameter = json_decode('{"fields": []}'); $parameter = json_decode('{"fields": []}');
@ -869,37 +869,37 @@ class InitDataCommand extends ContainerAwareCommand
$entityPage->setId(-110); $entityPage->setId(-110);
$entityPage->setRowOrder(0); $entityPage->setRowOrder(0);
$entityPage->setName('Accueil Groupe'); $entityPage->setName('Accueil Groupe');
$entityPage->setParentfor('group'); $entityPage->setParentfor('Groupe');
$entityPage->setMaxwidth(0); $entityPage->setMaxwidth(1500);
$entityPage->setPagecategory($entityPagecategory); $entityPage->setPagecategory($entityPagecategory);
$entityPage->setTemplate('{"rows":[{"id":0,"cols":[{"id":0,"size": 3,"rows":[]},{"id":1,"size": 6,"rows":[{"id":0,"cols":[{"id":0,"size": 6},{"id":1,"size": 6}]}]},{"id":2,"size": 3,"rows":[]}]}]}'); $entityPage->setTemplate('{"rows":[{"id":0,"cols":[{"id":0,"size": 4,"rows":[]},{"id":1,"size": 8,"rows":[{"id":0,"cols":[{"id":0,"size": 12}]},{"id":1,"cols":[{"id":0,"size": 6},{"id":1,"size": 6}]}]}]}]}');
$em->persist($entityPage); $em->persist($entityPage);
$em->flush(); $em->flush();
// Widget Nos Liens // Widget Nos Liens
$fields=["fields"=>[["id"=>"modedesktop","value"=>2]]]; $fields=["fields"=>[["id"=>"modedesktop","value"=>2]]];
$this->addWidget(-120,$entityPage,-1960,"R1C2R1C1",0,"Nos Liens",true,$fields); $this->addWidget(-120,$entityPage,-1960,"R1C1",1,"Nos Liens",true,$fields);
// Widget Nos Fichiers // Widget Nos Fichiers
$fields=["fields"=>[]]; $fields=["fields"=>[]];
$this->addWidget(-130,$entityPage,-1920,"R1C2R1C2",0,"Nos Fichiers",true,$fields); $this->addWidget(-130,$entityPage,-1920,"R1C1",2,"Nos Fichiers",true,$fields);
// Widget Info Page // Widget Info Page
$fields=["fields"=>[]]; $fields=["fields"=>[]];
$this->addWidget(-140,$entityPage,-1860,"R1C1",0,"Information Page",true,$fields); $this->addWidget(-140,$entityPage,-1860,"R1C1",3,"Information Page",true,$fields);
// Widget Notre Blog // Widget Notre Blog
$fields=["fields"=>[["id"=>"nbarticle","value"=>5]]]; $fields=["fields"=>[["id"=>"nbarticle","value"=>5]]];
$this->addWidget(-150,$entityPage,-1890,"R1C2",0,"Notre Blog",false,$fields); $this->addWidget(-150,$entityPage,-1890,"R1C2R1C1",1,"Notre Blog",false,$fields);
// Widget Notre Calendrier // Widget Notre Calendrier
$fields=["fields"=>[["id"=>"nbday","value"=>30]]]; $fields=["fields"=>[["id"=>"nbday","value"=>30]]];
$this->addWidget(-160,$entityPage,-1900,"R1C2R1C1",1,"Notre Calendrier",true,$fields); $this->addWidget(-160,$entityPage,-1900,"R1C2R2C1",1,"Notre Calendrier",true,$fields);
// Chat // Chat
$fields=["fields"=>[]]; $fields=["fields"=>[]];
$this->addWidget(-170,$entityPage,-1840,"R1C3",0,"Chat",false,$fields); $this->addWidget(-170,$entityPage,-1840,"R1C2R2C2",1,"Chat",true,$fields);
} }
$output->writeln(''); $output->writeln('');

View File

@ -243,7 +243,6 @@ class PagetemplateController extends Controller
} }
// Retour // Retour
dump("retdirect to".$this->generateUrl($this->routeprimary));
return $this->redirect($this->generateUrl($this->routeprimary)); return $this->redirect($this->generateUrl($this->routeprimary));
} }

View File

@ -3,22 +3,18 @@
{% block localstyle %} {% block localstyle %}
{% if framed %} {% if framed %}
{% if border %} {% if border %}
#topchat { #page-wrapper:last-of-type {
margin: 5px -15px 5px -25px; //padding: 5px 25px 10px 15px;
//background: transparent;
} }
.mychat{
margin: 0px 0px 0px -10px;
}
{% else %} {% else %}
#topchat { #page-wrapper {
margin: 5px -30px; padding: 5px 25px 0px 15px;
} //background: transparent;
.mychat{
margin: 0px -15px;
} }
{% endif %} {% endif %}
{% else %} {% else %}
#topchat { padding-top:20px; padding-bottom:30px; } #page-wrapper { padding-top:20px; padding-bottom:30px; }
{% endif %} {% endif %}
.message { .message {
@ -61,7 +57,7 @@
{% block pagewrapper %} {% block pagewrapper %}
{% if app.user and ingroup %} {% if app.user and ingroup %}
{{ form_start(form) }} {{ form_start(form) }}
<div id="topchat" class='row'> <div class='row'>
{{ form_widget(form.message) }} {{ form_widget(form.message) }}
<input id="sendbymail" type="checkbox" id="item_essential" name="item[essential]" style="float:right" class='switch' ></input> <input id="sendbymail" type="checkbox" id="item_essential" name="item[essential]" style="float:right" class='switch' ></input>
<label class="custom-control-label" for="sendbymail">Envoyer par Mail ?</label> <label class="custom-control-label" for="sendbymail">Envoyer par Mail ?</label>

View File

@ -4,7 +4,7 @@ parameters:
# Si SQL cela veut dire que c'est l'applicatif qui gère les utilisateurs # Si SQL cela veut dire que c'est l'applicatif qui gère les utilisateurs
# Sinon la source est externe soit via un annuaire soit via des attributs venant d'un SSO # Sinon la source est externe soit via un annuaire soit via des attributs venant d'un SSO
# Si la source est externe de fait pas de module d'inscription ni de reset de password # Si la source est externe de fait pas de module d'inscription ni de reset de password
# Et pas de synchronisation vers un annuaire # Et pas de synchronisation vers un annuaire ou vers ePortail
masteridentity: %%ninegate_masteridentity masteridentity: %%ninegate_masteridentity
# Mode d'authentification soit SQL / LDAP / CAS / SAML # Mode d'authentification soit SQL / LDAP / CAS / SAML