Commit 080798ab authored by Matthieu FAURE's avatar Matthieu FAURE
Browse files

Comptoir-srv v2.4.9

parents ee54071d aa9ef24d
Pipeline #1627 failed with stage
in 10 minutes and 45 seconds
......@@ -12,21 +12,21 @@ et le projet suit [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
### Deprecated
### Removed
### Fixed
### Security
## [2.4.9](https://gitlab.adullact.net/Comptoir/Comptoir-srv/tags/v2.4.9) - 2018-08-16
### Fixed
* [#573](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/573) Correction du lien erroné dans le courriel de mot de passe perdu
* [#572](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/572) Mise à jour des paramètres STMP par défaut
## [2.4.8](https://gitlab.adullact.net/Comptoir/Comptoir-srv/tags/v2.4.8) - 2018-08-14
### Added
### Changed
### Deprecated
### Removed
### Fixed
* [#542](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/542) Correction de l'affichage de tous les logiciels d'un tag
### Security
## [2.4.8-rc.2](https://gitlab.adullact.net/Comptoir/Comptoir-srv/tags/v2.4.8-rc.2) - 2018-08-14
### Added
......@@ -36,9 +36,6 @@ et le projet suit [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
* [#563](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/563) (Développeurs) Ajout de la dernière version de DebugKit dans l'image Docker "locale"
* [#564](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/564) (Développeurs) Mise à jour de l'image Docker Comptoir base en v1.0.0-rc.2
### Changed
### Deprecated
### Removed
### Fixed
* [#559](https://gitlab.adullact.net/Comptoir/Comptoir-srv/issues/559) Page d'accueil : Corrigé le lien vers les derniers logiciels ajoutés
......@@ -59,9 +56,6 @@ et le projet suit [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
* Les prestataires sont maintenant séparés des utilisateurs et disposent d'une entrée propre dans la barre de navigation.
### Security
### Fixed
* Correction de bugs d'internationalisation (tout est censé être traduit de l'anglais vers le français)
## 2.4.7 - 2018-03-30
......
......@@ -7,6 +7,7 @@
* change the version in `config/bootstrap.php`
* update `CHANGELOG.md`
* create the upgrade doc in `Documentation/For_ops/UPGRADE`
* Update release note of tag in Gitlab
* Eventually make other adjustments
## 2. Merge, tag and push
......@@ -16,8 +17,14 @@ Once the MR for "prepare vX.Y.Z" is OK **in develop**:
```sh
git checkout master
MYTAG="vX.Y.Z"
git merge develop --no-ff -m "Comptoir-srv $MYTAG"
git merge develop --no-ff -m "Comptoir $MYTAG"
git tag -a $MYTAG -m "$MYTAG"
git push origin master
git push origin $MYTAG
```
## 3. Run functional tests
1. Install release on a pre-prod environment
2. Run automated functional tests
3. Run [manual tests](../../tests/Manual_tests/README.md)
......@@ -14,7 +14,7 @@ As user `comptoir`, do:
```shell
cd /home/comptoir/Comptoir-srv && \
git fetch -p && \
git checkout "v2.4.8-rc.2"
git checkout "v2.4.8"
```
## Update `config/comptoir.php`
......
# How to upgrade from v2.4.8 to v2.4.9
## Save `config/comptoir.php`
```shell
cd /home/comptoir/Comptoir-srv && \
cp config/comptoir.php config/comptoir.php-$(date +%Y-%m-%d_%kh%M)
```
## Grab source code
As user `comptoir`, do:
```shell
cd /home/comptoir/Comptoir-srv && \
git fetch -p && \
git checkout "v2.4.9"
```
## Update `config/comptoir.php`
1. `cd /home/comptoir/Comptoir-srv/config && cp comptoir.default.php comptoir.php`
1. Re-add customized values from the old `comptoir.php` into the new one (like the Piwik stanza or Pick of the month)
## Remove temporary i18n files
```shell
sudo rm -f /home/comptoir/Comptoir-srv/tmp/cache/persistent/*
```
......@@ -168,16 +168,14 @@ return [
*/
'EmailTransport' => [
'default' => [
'className' => 'Debug',
// The following keys are used in SMTP transports
'host' => env('EMAIL_HOST','smtp.adullact.org'),
'port' => env('EMAIL_PORT',25),
'timeout' => 30,
'username' => env('EMAIL_USERNAME','app.comptoirdulibre@adullact.org'),
// **Please** change me --> password
'password' => env('EMAIL_PASSWORD','secret'),
'className' => 'Smtp',
'host' => 'localhost',
'port' => 25,
//'timeout' => 30,
//'username' => env('EMAIL_USERNAME','app.comptoirdulibre@adullact.org'),
//'password' => env('EMAIL_PASSWORD','secret'),
'client' => null,
'tls' => false,
//'tls' => false,
],
],
......
......@@ -270,7 +270,7 @@ Configure::write(
// Version of comptoir
Configure::write('VERSION',
[
"footer" => "v2.4.8"
"footer" => "v2.4.9"
]
);
......
......@@ -18,10 +18,11 @@
* @link http://cakephp.org CakePHP(tm) Project
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Routing\Router;
use Cake\Routing\RouteBuilder;
use Cake\Core\Configure;
use Cake\Routing\Router;
/**
* The default class to use for all routes
......@@ -43,23 +44,32 @@ use Cake\Core\Configure;
*/
Router::defaultRouteClass('DashedRoute');
Router::addUrlFilter(function ($params, $request) {
if (isset($request->params['language']) && !isset($params['language'])) {
$params['language'] = $request->params['language'];
Router::addUrlFilter(
function ($params, $request) {
if (isset($request->params['language']) && !isset($params['language'])) {
$params['language'] = $request->params['language'];
}
return $params;
}
);
return $params;
});
Router::scope('/', function ($routes) {
});
Router::scope('/',
function ($routes) {
}
);
$basicRoutes = function (RouteBuilder $routes) {
$routes->connect('/softwares/add-review/:software_id', ['controller' => 'Reviews', 'action' => 'add', "pass" => ["software_id"], "prefix" => Configure::read("DEFAULT_PREFIX")]);
$routes->connect('/softwares/add-review/:software_id',
[
'controller' => 'Reviews',
'action' => 'add',
"pass" => ["software_id"],
"prefix" => Configure::read("DEFAULT_PREFIX")
]
);
// Pages ==================================================================
$routes->resources('Pages',
[
"prefix" => Configure::read("DEFAULT_PREFIX"),
......@@ -91,6 +101,7 @@ $basicRoutes = function (RouteBuilder $routes) {
]
]);
// Software ===============================================================
$routes->resources('Softwares',
[
"prefix" => Configure::read("DEFAULT_PREFIX"),
......@@ -142,7 +153,7 @@ $basicRoutes = function (RouteBuilder $routes) {
],
'edit/:id' => [
'action' => 'edit',
'method' => ['GET','PUT']
'method' => ['GET', 'PUT']
],
'view/:id' => [
'action' => 'view',
......@@ -150,7 +161,7 @@ $basicRoutes = function (RouteBuilder $routes) {
],
'add' => [
'action' => 'add',
'method' => ['GET','POST']
'method' => ['GET', 'POST']
],
"index/" => [
'action' => 'index',
......@@ -159,7 +170,6 @@ $basicRoutes = function (RouteBuilder $routes) {
]
]);
/**
* Software routing
*/
......@@ -170,9 +180,7 @@ $basicRoutes = function (RouteBuilder $routes) {
$routes->connect('/softwares/add-review/:software_id', ['controller' => 'Reviews', 'action' => 'add', "pass" => ["software_id"]]);
/**
* Users routing
*/
// Users ==================================================================
$routes->resources('Users',
[
"prefix" => Configure::read("DEFAULT_PREFIX"),
......@@ -210,7 +218,6 @@ $basicRoutes = function (RouteBuilder $routes) {
'action' => 'forgotPassword',
'method' => ['GET', 'POST']
],
'change-password' => [
'action' => 'changePassword',
'method' => ['GET']
......@@ -225,7 +232,7 @@ $basicRoutes = function (RouteBuilder $routes) {
],
'contact/:id' => [
'action' => 'contact',
'method' => ['GET','POST']
'method' => ['GET', 'POST']
],
"index/" => [
'action' => 'index',
......@@ -234,9 +241,7 @@ $basicRoutes = function (RouteBuilder $routes) {
]
]);
/*
* Tags routing
*/
// Tags ===================================================================
$routes->resources('Tags',
[
"prefix" => Configure::read("DEFAULT_PREFIX"),
......@@ -256,12 +261,12 @@ $basicRoutes = function (RouteBuilder $routes) {
* SoftwaresTags routing
*/
$routes->resources('SoftwaresTags',
[
"prefix" => Configure::read("DEFAULT_PREFIX"),
"map" => [
[
"prefix" => Configure::read("DEFAULT_PREFIX"),
"map" => [
]
]);
]
]);
$routes->connect("/", ["controller" => "Pages", "action" => "index", "prefix" => Configure::read("DEFAULT_PREFIX")]);
......@@ -286,9 +291,9 @@ Router::prefix('api/v1', function ($routes) {
* Users routing
*/
$routes->resources('Users');
$routes->connect('/users/servicesproviderUsers', ['controller' => 'Users', 'action' => 'servicesproviderUsers']);
$routes->connect('/users/add', ['controller' => 'Users', 'action' => 'add','_method' => 'GET']);
$routes->connect('/users/logout', ['controller' => 'Users', 'action' => 'logout']);
$routes->connect('/users/servicesproviderUsers', ['controller' => 'Users', 'action' => 'servicesproviderUsers']);
$routes->connect('/users/add', ['controller' => 'Users', 'action' => 'add', '_method' => 'GET']);
$routes->connect('/users/logout', ['controller' => 'Users', 'action' => 'logout']);
$routes->resources('Reviews');
......
......@@ -18,14 +18,15 @@ class UserMailer extends Mailer
->set(
[
'userName' => $user->username,
'message' => __d("Email","Please follow this link to reset your password : {0} \n",Configure::read('App.fullBaseUrl') . DS. "users".DS."changePassword".DS.$user->token),
'message' => __d("Email",
"Please follow this link to reset your password : {0} \n",
Configure::read('App.fullBaseUrl') . DS . "users" . DS . "change-password" . DS . $user->token),
]
)
->transport('default');
}
/**
* Send a email to an user in Comptoir du Libre
* @param Event $event
......@@ -36,10 +37,10 @@ class UserMailer extends Mailer
$this
->to($event->data['recipient'])
->from("barman@comptoir-du-libre.org")
->subject(Configure::read("Mail.Contact.UserToUser.Prefix").$event->data["subject"])
->subject(Configure::read("Mail.Contact.UserToUser.Prefix") . $event->data["subject"])
->replyTo($event->data['email'])
->template('contactViaForm')// Par défaut le template avec le même nom que le nom de la méthode est utilisé.
->set (
->set(
[
'message' => $event->data["text"],
]
......
# Manual tests
## Purpose
Tests that should be done by a human. They are the last type of test after unit-tests and functional / acceptance tests.
## Create an account
## Verify lost password
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment