Commit a9d3c164 authored by Aster's avatar Aster Committed by waltermazza
Browse files

General Bug Fixes and Improvements

parent d8f42441
...@@ -11,13 +11,13 @@ Installation ...@@ -11,13 +11,13 @@ Installation
Either run Either run
```bash ```bash
composer require elitedivision/amos-social-auth composer require arter/amos-social-auth
``` ```
or add or add
``` ```
"elitedivision/amos-social-auth": "~1.0" "arter/amos-social-auth": "~1.0"
``` ```
to the require section of your `composer.json` file. to the require section of your `composer.json` file.
...@@ -28,7 +28,7 @@ Installation ...@@ -28,7 +28,7 @@ Installation
<?php <?php
'modules' => [ 'modules' => [
'socialauth' => [ 'socialauth' => [
'class' => 'elitedivision\amos\socialauth\Module' 'class' => 'arter\amos\socialauth\Module'
], ],
], ],
``` ```
...@@ -36,7 +36,7 @@ Installation ...@@ -36,7 +36,7 @@ Installation
3. Apply migrations 3. Apply migrations
```bash ```bash
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-social-auth/src/migrations php yii migrate/up --migrationPath=@vendor/arter/amos-social-auth/src/migrations
``` ```
...@@ -49,7 +49,7 @@ Configuration ...@@ -49,7 +49,7 @@ Configuration
<?php <?php
'modules' => [ 'modules' => [
'socialauth' => [ 'socialauth' => [
'class' => 'elitedivision\amos\socialauth\Module', 'class' => 'arter\amos\socialauth\Module',
'enableLogin' => true, 'enableLogin' => true,
'enableLink' => false, 'enableLink' => false,
'enableRegister' => false, 'enableRegister' => false,
...@@ -98,7 +98,7 @@ To enable social links check in admin configuraion the visibility for box social ...@@ -98,7 +98,7 @@ To enable social links check in admin configuraion the visibility for box social
```php ```php
$modules['admin'] = [ $modules['admin'] = [
'class' => 'elitedivision\amos\admin\AmosAdmin', 'class' => 'arter\amos\admin\AmosAdmin',
'enableRegister' => true, 'enableRegister' => true,
'fieldsConfigurations' => [ 'fieldsConfigurations' => [
'boxes' => [ 'boxes' => [
......
{ {
"name": "elitedivision/amos-social-auth", "name": "arter/amos-social-auth",
"description": "Social Auth", "description": "Social Auth",
"keywords": ["amos", "auth", "social", "yii2"], "keywords": ["amos", "auth", "social", "yii2"],
"homepage": "https://bitbucket.org/elite_division/amos-social-auth", "homepage": "https://bitbucket.org/arter/amos-social-auth",
"type": "component", "type": "component",
"require": { "require": {
"php": ">=5.4.0", "php": ">=5.4.0",
"elitedivision/amos-admin":"^2.0.18", "arter/amos-admin":"^2.0.18",
"elitedivision/amos-core":"^1.9.52", "arter/amos-core":"^1.9.52",
"elitedivision/amos-attachments":"^1.0", "arter/amos-attachments":"^1.0",
"hybridauth/hybridauth": "~2.9", "hybridauth/hybridauth": "~2.9",
"google/apiclient": "^2.0", "google/apiclient": "^2.0",
"yiisoft/yii2-authclient": "^2.1.0", "yiisoft/yii2-authclient": "^2.1.0",
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"elitedivision\\amos\\socialauth\\": "src" "arter\\amos\\socialauth\\": "src"
} }
} }
} }
\ No newline at end of file
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\socialauth; namespace arter\amos\socialauth;
use elitedivision\amos\admin\AmosAdmin; use arter\amos\admin\AmosAdmin;
use elitedivision\amos\admin\models\UserProfile; use arter\amos\admin\models\UserProfile;
use elitedivision\amos\core\module\AmosModule; use arter\amos\core\module\AmosModule;
use elitedivision\amos\socialauth\controllers\ShibbolethController; use arter\amos\socialauth\controllers\ShibbolethController;
use elitedivision\amos\socialauth\models\SocialAuthServices; use arter\amos\socialauth\models\SocialAuthServices;
use elitedivision\amos\socialauth\utility\SocialAuthUtility; use arter\amos\socialauth\utility\SocialAuthUtility;
use Yii; use Yii;
use yii\base\BootstrapInterface; use yii\base\BootstrapInterface;
use yii\base\Event; use yii\base\Event;
...@@ -28,7 +24,7 @@ use yii\helpers\ArrayHelper; ...@@ -28,7 +24,7 @@ use yii\helpers\ArrayHelper;
/** /**
* Class Module * Class Module
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
*/ */
class Module extends AmosModule implements BootstrapInterface class Module extends AmosModule implements BootstrapInterface
{ {
...@@ -94,7 +90,7 @@ class Module extends AmosModule implements BootstrapInterface ...@@ -94,7 +90,7 @@ class Module extends AmosModule implements BootstrapInterface
/** /**
* @inheritdoc * @inheritdoc
*/ */
public $controllerNamespace = 'elitedivision\amos\socialauth\controllers'; public $controllerNamespace = 'arter\amos\socialauth\controllers';
public $timeout = 180; public $timeout = 180;
...@@ -121,7 +117,7 @@ class Module extends AmosModule implements BootstrapInterface ...@@ -121,7 +117,7 @@ class Module extends AmosModule implements BootstrapInterface
public function init() public function init()
{ {
parent::init(); // TODO: Change the autogenerated stub parent::init(); // TODO: Change the autogenerated stub
\Yii::setAlias('@elitedivision/amos/' . static::getModuleName() . '/controllers', __DIR__ . '/controllers'); \Yii::setAlias('@arter/amos/' . static::getModuleName() . '/controllers', __DIR__ . '/controllers');
//Configuration //Configuration
$config = require(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php'); $config = require(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php');
...@@ -307,7 +303,7 @@ class Module extends AmosModule implements BootstrapInterface ...@@ -307,7 +303,7 @@ class Module extends AmosModule implements BootstrapInterface
//Init a new shibboleth controller to link user //Init a new shibboleth controller to link user
$shibbolethController = new ShibbolethController('shibboleth', $this); $shibbolethController = new ShibbolethController('shibboleth', $this);
Event::on(AmosAdmin::instance()->model('UserProfile'), UserProfile::EVENT_AFTER_INSERT, ['elitedivision\amos\socialauth\utility\SocialAuthUtility', 'createIdmUser']); Event::on(AmosAdmin::instance()->model('UserProfile'), UserProfile::EVENT_AFTER_INSERT, ['arter\amos\socialauth\utility\SocialAuthUtility', 'createIdmUser']);
//Get Session IDM datas (copy of headers) //Get Session IDM datas (copy of headers)
$sessionIDM = \Yii::$app->session->get('IDM'); $sessionIDM = \Yii::$app->session->get('IDM');
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\socialauth\components; namespace arter\amos\socialauth\components;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
use Yii; use Yii;
use yii\base\Component; use yii\base\Component;
use yii\base\Widget; use yii\base\Widget;
...@@ -25,7 +21,7 @@ use yii\helpers\Html; ...@@ -25,7 +21,7 @@ use yii\helpers\Html;
/** /**
* Class FileImport * Class FileImport
* @package elitedivision\amos\socialauth\components * @package arter\amos\socialauth\components
*/ */
class SocialAuthBar extends Widget class SocialAuthBar extends Widget
{ {
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\socialauth\components; namespace arter\amos\socialauth\components;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\models\SocialAuthUsers; use arter\amos\socialauth\models\SocialAuthUsers;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
use Yii; use Yii;
use yii\base\Component; use yii\base\Component;
use yii\base\Widget; use yii\base\Widget;
...@@ -26,7 +22,7 @@ use yii\helpers\Html; ...@@ -26,7 +22,7 @@ use yii\helpers\Html;
/** /**
* Class FileImport * Class FileImport
* @package elitedivision\amos\socialauth\components * @package arter\amos\socialauth\components
*/ */
class SocialLinkBar extends Widget class SocialLinkBar extends Widget
{ {
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\socialauth\components * @package arter\amos\socialauth\components
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\socialauth\components; namespace arter\amos\socialauth\components;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
use Yii; use Yii;
use yii\base\Widget; use yii\base\Widget;
/** /**
* Class SocialLinkTable * Class SocialLinkTable
* @package elitedivision\amos\socialauth\components * @package arter\amos\socialauth\components
*/ */
class SocialLinkTable extends Widget class SocialLinkTable extends Widget
{ {
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\socialauth\components; namespace arter\amos\socialauth\components;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
use Yii; use Yii;
use yii\base\Component; use yii\base\Component;
use yii\base\Widget; use yii\base\Widget;
...@@ -25,7 +21,7 @@ use yii\helpers\Html; ...@@ -25,7 +21,7 @@ use yii\helpers\Html;
/** /**
* Class FileImport * Class FileImport
* @package elitedivision\amos\socialauth\components * @package arter\amos\socialauth\components
*/ */
class SocialSignUpBar extends Widget class SocialSignUpBar extends Widget
{ {
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use yii\helpers\Html; use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
?> ?>
<div class="social-auth-bar"> <div class="social-auth-bar">
<?php <?php
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use yii\helpers\Html; use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
use elitedivision\amos\socialauth\Module; use arter\amos\socialauth\Module;
?> ?>
<div class="social-auth-bar"> <div class="social-auth-bar">
<?php <?php
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use yii\helpers\Html; use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
?> ?>
<div class="social-auth-bar"> <div class="social-auth-bar">
<?php <?php
...@@ -47,7 +43,7 @@ use elitedivision\amos\core\icons\AmosIcons; ...@@ -47,7 +43,7 @@ use elitedivision\amos\core\icons\AmosIcons;
<button type="button" class="btn btn-social collega-social" data-type="<?= $lowCaseName ?>"> <button type="button" class="btn btn-social collega-social" data-type="<?= $lowCaseName ?>">
<span class="fa fa-<?= $lowCaseName ?>"></span> <span class="fa fa-<?= $lowCaseName ?>"></span>
<span> <span>
<?= \elitedivision\amos\socialauth\Module::t('amossocialauth', 'Collega il tuo profilo') ?> <?= \arter\amos\socialauth\Module::t('amossocialauth', 'Collega il tuo profilo') ?>
</span> </span>
</button> </button>
<?php endif; ?> <?php endif; ?>
...@@ -72,14 +68,14 @@ use elitedivision\amos\core\icons\AmosIcons; ...@@ -72,14 +68,14 @@ use elitedivision\amos\core\icons\AmosIcons;
</div> </div>
<div class="field-media"> <div class="field-media">
<label>Email</label> <label>Email</label>
<span>damian.gomez@elitedivision.it</span> <span>damian.gomez@arter.it</span>
</div> </div>
</div> </div>
</div> </div>
<?php else: ?> <?php else: ?>
<div class="validatore_container checkws"> <div class="validatore_container checkws">
<br> <br>
<?= \elitedivision\amos\socialauth\Module::t('amossocialauth', 'Nessun profilo collegato.') ?> <?= \arter\amos\socialauth\Module::t('amossocialauth', 'Nessun profilo collegato.') ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use yii\helpers\Html; use yii\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
?> ?>
<div class="social-auth-bar"> <div class="social-auth-bar">
<?php <?php
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\socialauth * @package arter\amos\socialauth
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
return [ return [
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0