Merge branch 'master' into master

This commit is contained in:
Jim LAURIE 2018-09-29 14:29:25 +02:00 committed by GitHub
commit e98589e130
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 77 additions and 41 deletions

View File

@ -1,18 +1,22 @@
<!-- ⚠️ If you do not respect this template your issue will be closed. -->
<!-- ISSUE TEMPLATE -->
<!-- =============================================================================== -->
<!-- ⚠️ If you are not using the current Strapi release, you will be asked to update. -->
<!-- Please see the wiki for guides on upgrading to the latest release. -->
<!-- =============================================================================== -->
<!-- ⚠️ Make sure to browse the opened and closed issues before submitting your issue. -->
<!-- ⚠️ Before writing your issue make sure you are using:-->
<!-- Node 9.x.x -->
<!-- npm 5.x.x -->
<!-- The latest version of Strapi. -->
<!-- Node 10.x.x -->
<!-- npm 6.x.x -->
**Informations**
- **Node.js version**:
- **npm version**:
- **Strapi version**:
- **Database**:
- **Operating system**:
- **Node.js version**:
- **npm version**:
- **Strapi version**: <!-- Please make sure you are on the latest version -->
- **Database**:
- **Operating system**:
**What is the current behavior?**
@ -28,19 +32,3 @@
**Suggested solutions**
<!-- ⚠️ Make sure to browse the opened and closed issues before submitting your issue. -->
<!-- FEATURE REQUEST TEMPLATE -->
<!-- ⚠️ If you do not respect this template your issue will be closed. -->
**What is the expected behavior?**
<!-- ⚠️ Make sure to browse the opened and closed issues before submitting your issue. -->

View File

@ -5,17 +5,23 @@ about: Create a report to help us improve 🤔.
<!-- ⚠️ If you do not respect this template your issue will be closed. -->
<!-- =============================================================================== -->
<!-- ⚠️ If you are not using the current Strapi release, you will be asked to update. -->
<!-- Please see the wiki for guides on upgrading to the latest release. -->
<!-- =============================================================================== -->
<!-- ⚠️ Make sure to browse the opened and closed issues before submitting your issue. -->
<!-- ⚠️ Before writing your issue make sure you are using:-->
<!-- Node 9.x.x -->
<!-- npm 5.x.x -->
<!-- The latest version of Strapi. -->
<!-- Node 10.x.x -->
<!-- npm 6.x.x -->
**Informations**
- **Node.js version**:
- **npm version**:
- **Strapi version**:
- **Database**:
- **Operating system**:
- **Node.js version**:
- **npm version**:
- **Strapi version**: <!-- Please make sure you are on the latest version -->
- **Database**:
- **Operating system**:
**What is the current behavior?**
@ -31,7 +37,3 @@ about: Create a report to help us improve 🤔.
**Suggested solutions**
<!-- ⚠️ Make sure to browse the opened and closed issues before submitting your issue. -->

View File

@ -5,8 +5,8 @@ about: Suggest an idea for this project 💡!
<!-- ⚠️ If you do not respect this template your issue will be closed. -->
<!-- ⚠️ Make sure to browse the opened and closed issues before submitting your issue. -->
**What is the expected behavior?**
<!-- ⚠️ Make sure to browse the opened and closed issues before submitting your issue. -->

View File

@ -246,6 +246,33 @@ Most of the application's configurations are defined by environment. It means th
> Please refer to the [dynamic configurations section](#dynamic-configurations) to use global environment variable to configure the databases.
#### MLab Example
**Path —** `./config/environments/**/database.json`.
```json
{
"defaultConnection": "default",
"connections": {
"default": {
"connector": "strapi-hook-mongoose",
"settings": {
"client": "mongo",
"host": "ds123456.mlab.com",
"port": 12345,
"database": "mlab_db_name",
"username": "mlab_user_name",
"password": "mlab_pass"
},
"options": {
"authenticationDatabase": "mlab_db_name",
"ssl": false
}
}
}
}
```
> Please note that you must give your MLab database name as the authenticationDatabase and your password can not contain the "@" symbol.

0
packages/strapi-generate-new/files/server.js Normal file → Executable file
View File

View File

@ -1,4 +1,17 @@
import { forEach, isObject, isArray, map, mapKeys, includes, reject, isEmpty, findIndex, isUndefined } from 'lodash';
import {
forEach,
isObject,
isArray,
map,
mapKeys,
includes,
reject,
isEmpty,
findIndex,
isUndefined,
isBoolean,
isNumber,
} from 'lodash';
/* eslint-disable consistent-return */
export function getValidationsFromForm(form, formValidations) {
@ -88,7 +101,7 @@ function validate(value, validations) {
case 'type':
if (validationValue === 'json') {
try {
if (isObject(value)) {
if (isObject(value) || isBoolean(value) || isNumber(value) || isArray(value)) {
value = JSON.parse(JSON.stringify(value));
} else {
errors.push({ id: 'content-manager.error.validation.json' });

View File

@ -76,6 +76,10 @@ export class AuthPage extends React.Component { // eslint-disable-line react/pre
}
if (!isEmpty(get(this.props.modifiedData, 'password')) && !isEmpty(get(this.props.modifiedData, 'confirmPassword')) && findIndex(acc, ['name', 'confirmPassword']) === -1) {
if (this.props.modifiedData.password.length < 6) {
acc.push({ name: 'password', errors: [{ id: 'users-permissions.components.Input.error.password.length' }] });
}
if (get(this.props.modifiedData, 'password') !== get(this.props.modifiedData, 'confirmPassword')) {
acc.push({ name: 'confirmPassword', errors: [{ id: 'users-permissions.components.Input.error.password.noMatch' }] });
}

View File

@ -142,6 +142,7 @@
"PopUpForm.header.edit.providers": "Edit {provider} Provider",
"PopUpForm.inputSelect.providers.label": "Choose the provider",
"components.Input.error.password.noMatch": "Passwords do not match",
"components.Input.error.password.length": "Password is too short",
"notification.error.delete": "An error occurred while trying to delete the item",
"notification.error.fetch": "An error occurred while trying to fetch data",
"notification.error.fetchUser": "An error occurred while trying to fetch users",

View File

@ -133,6 +133,7 @@
"PopUpForm.header.edit.providers": "Editer {provider} Provider",
"PopUpForm.inputSelect.providers.label": "Sélectionnez le provider",
"components.Input.error.password.noMatch": "Le mot de passe ne correspond pas",
"components.Input.error.password.length": "Le password doit contenir au moins 6 caractères",
"notification.error.delete": "Une erreur est survenue en essayant de supprimer cet élément",
"notification.error.fetch": "Une erreur est survenue en essayant de récupérer les données",
"notification.error.fetchUser": "Une erreur est survenue en esssayent de récupérer les users",

0
packages/strapi/bin/strapi.js Normal file → Executable file
View File