Skip to content
This repository was archived by the owner on May 30, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ language: php

env:
global:
- GLPI_SOURCE="https://github.com/glpi-project/glpi -b 9.2/bugfixes"
- FUSION_SOURCE="https://github.com/fusioninventory/fusioninventory-for-glpi -b master"
- GLPI_SOURCE="https://github.com/glpi-project/glpi -b 9.2/bugfixes"
- FUSION_SOURCE="https://github.com/fusioninventory/fusioninventory-for-glpi -b master"
- FLYVEMDM_SOURCE="https://github.com/flyve-mdm/flyve-mdm-glpi-plugin -b develop"
- secure: riqurLkD5HXiKdkjSZXipb4+2VhXIjV6yjex7z89eHYqVhK049k/qIuxX2nCCCB7BxVuA+2fjDXXgjH4XihYvIcwxepplbDEjzgTYp/dDmN/8w3v9GvNBrD5fiV68a98Wpdy9zfbGk5hcoabKGJdyYCAFzCqLYmMGo5JU52lV2v6FcjkmkogFEpcKkg6+eZvDdCuCMgKziXwXKG7mDENAZA3PlPMaTmQ+sNaCWyYPKYC08+TGRIP9sS+lTY78SW/gY06CgWeJ1cF/MSRf8g0payEl9B4BuVFt8eAk+QIhDxvfkUmjIMEciT9c3stwsLnZQW1P4AAsmAqpmdajoGPg8XY+ZmFNdvAkh9hbGzdIy50v+cKlNyi2w/ZC5iQg43fmC0YwoGLd225FI1gJQFMkQiMYj2mi1Ir0/QFfVM5G5VWALRGQs5CyGOl9MOy01QISkkuURHYGLw+7jCCZyYmfww5gFO4RFcjPDBpoQt8Ra3Lbq1IaWt/gd4eQWjoXqiUjkYQ5L0tHd2Na4DR9q7X72mPoswUucxRAusF1M883uxIVWJRGFVs3Sup6U8qnZxXrpWIN8fpAtO7NuTQoCF48AhIC32+i41Ab002AUQLij8r8GGVehprhgyTbqDtd7zXWuC04rWBwVmXLsYvvqcszY2INUz4/jPswvHuvpZraxI=
- DB=glpitest

cache:
directories:
- $HOME/.composer/cache
Expand All @@ -19,7 +19,7 @@ before_script:
- tests/config-composer.sh
- git clone --depth=1 $GLPI_SOURCE ../glpi && cd ../glpi
- composer install --no-dev
- php tools/cliinstall.php --db=$DB --user=travis --tests
- php scripts/cliinstall.php --db=$DB --user=travis --tests
- cp tests/config_db.php config/config_db.php
- mkdir plugins/fusioninventory && git clone --depth=1 $FUSION_SOURCE plugins/fusioninventory
- mkdir plugins/flyvemdm && git clone --depth=1 $FLYVEMDM_SOURCE plugins/flyvemdm
Expand All @@ -42,6 +42,6 @@ matrix:
- php: nightly
allow_failures:
- php: nightly

notifications:
webhooks: https://hooks.aethonan.pro/travisci/-1001061475099/
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"glpi-project/coding-standard" : "0.5",
"glpi-project/tools": "0.1.3",
"phpunit/phpunit" : "^4.8 || ^5.4 || ^6.0",
"flyve-mdm/test" : "^1.0",
"flyve-mdm/test" : "dev-master#175b4d4be344381cb0829e7cdc6e5af91f72a017",
"consolidation/robo" : "^1.0",
"evert/phpdoc-md": "^0.2.0",
"phpdocumentor/phpdocumentor": "2.*"
Expand Down
3 changes: 3 additions & 0 deletions inc/config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ public static function configUpdate($input) {
$config->resetDemoNotificationSignature();
$config->disableDemoAccountService();
} else {
if (strrpos($input['webapp_url'], '/') != strlen($input['webapp_url']) - 1) {
$input['webapp_url'] .= '/';
}
$config->setDemoNotificationSignature();
$config->enableDemoAccountService();
}
Expand Down
2 changes: 1 addition & 1 deletion inc/notificationtargetaccountvalidation.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function addDataForTemplate($event, $options = array()) {
$accountValidation = $this->obj;
$accountValidationId = $accountValidation->getID();
$validationToken = $accountValidation->getField('validation_pass');
$validationUrl = $config['webapp_url'] . "#!/account/$accountValidationId/validation/$validationToken";
$validationUrl = $config['webapp_url'] . "validateAccount/$accountValidationId/validation/$validationToken";

$activationDelay = new DateInterval('P' . $accountValidation->getActivationDelay() . 'D');
$activationDelay = $activationDelay->format('%d');
Expand Down
7 changes: 4 additions & 3 deletions install/installer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ protected function createRegisteredProfileAccess() {
Software::$rightname => READ,
NetworkPort::$rightname => READ,
CommonDropdown::$rightname => READ,
KnowbaseItem::$rightname => READ | KnowbaseItem::READFAQ | KnowbaseItem::COMMENTS,
));
$profile = new Profile();
$profile->update([
Expand Down Expand Up @@ -613,7 +614,7 @@ protected function getNotificationTargetRegistrationEvents() {
),
PluginFlyvemdmdemoNotificationTargetAccountvalidation::EVENT_TRIAL_BEGIN => array(
'itemtype' => PluginFlyvemdmdemoAccountvalidation::class,
'name' => __('Account activated', "flyvemdmdemo"),
'name' => __('Account activated', 'flyvemdmdemo'),
'subject' => __('Get started with Flyve MDM', 'flyvemdmdemo'),
'content_text' => __('Hi there,

Expand Down Expand Up @@ -654,7 +655,7 @@ protected function getNotificationTargetRegistrationEvents() {
),
PluginFlyvemdmdemoNotificationTargetAccountvalidation::EVENT_TRIAL_EXPIRATION_REMIND_1 => array(
'itemtype' => PluginFlyvemdmdemoAccountvalidation::class,
'name' => __('First trial reminder', "flyvemdmdemo"),
'name' => __('First trial reminder', 'flyvemdmdemo'),
'subject' => __('Your Flyve MDM trial will end soon! - Only ##flyvemdmdemo.days_remaining## left!', 'flyvemdmdemo'),
'content_text' => __('Hi there,

Expand Down Expand Up @@ -859,7 +860,7 @@ protected function createSocialMediaIcons() {
$document = new Document();
$input['entities_id'] = '0';
$input['is_recursive'] = '1';
$input['name'] = __('Flyve MDM Facebook icon', 'flyvemdmdemo');
$input['name'] = __('Flyve MDM Facebook icon', 'flyvemdmdemo');
$input['_filename'] = array('flyve-facebook.jpg');
$input['_only_if_upload_succeed'] = true;
if ($document->add($input)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,11 @@ public function testRegisteredUserProfileConfigRight($rights) {
$this->assertEquals(READ, $rights[Config::$rightname]);
}

/**
* @depends testGetRights
* @param array $rights
*/
public function testRegisteredUserProfileKnowbaseItemRight($rights) {
$this->assertEquals(READ | KnowbaseItem::READFAQ | KnowbaseItem::COMMENTS, $rights[Config::$rightname]);
}
}