mirror of
https://github.com/plankanban/planka.git
synced 2025-07-23 15:19:44 +02:00
Merge branch 'master' of https://github.com/Nounoursdestavernes/planka into pr/849
This commit is contained in:
commit
4b6e52a9c6
11 changed files with 35 additions and 6 deletions
|
@ -15,13 +15,13 @@ type: application
|
||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.2.6
|
version: 0.2.7
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
# It is recommended to use it with quotes.
|
# It is recommended to use it with quotes.
|
||||||
appVersion: "1.21.0"
|
appVersion: "1.21.1"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- alias: postgresql
|
- alias: postgresql
|
||||||
|
|
|
@ -28,6 +28,11 @@ const createMessage = (error) => {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
content: 'common.invalidPassword',
|
content: 'common.invalidPassword',
|
||||||
};
|
};
|
||||||
|
case 'Invalid credentials':
|
||||||
|
return {
|
||||||
|
type: 'error',
|
||||||
|
content: 'common.invalidCredentials',
|
||||||
|
};
|
||||||
case 'Use single sign-on':
|
case 'Use single sign-on':
|
||||||
return {
|
return {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
@ -116,6 +121,10 @@ const Login = React.memo(
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (wasSubmitting && !isSubmitting && error) {
|
if (wasSubmitting && !isSubmitting && error) {
|
||||||
switch (error.message) {
|
switch (error.message) {
|
||||||
|
case 'Invalid credentials':
|
||||||
|
emailOrUsernameField.current.select();
|
||||||
|
|
||||||
|
break;
|
||||||
case 'Invalid email or username':
|
case 'Invalid email or username':
|
||||||
emailOrUsernameField.current.select();
|
emailOrUsernameField.current.select();
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ export default {
|
||||||
common: {
|
common: {
|
||||||
emailOrUsername: 'E-mail or username',
|
emailOrUsername: 'E-mail or username',
|
||||||
invalidEmailOrUsername: 'Invalid e-mail or username',
|
invalidEmailOrUsername: 'Invalid e-mail or username',
|
||||||
|
invalidCredentials: 'Invalid credentials',
|
||||||
invalidPassword: 'Invalid password',
|
invalidPassword: 'Invalid password',
|
||||||
logInToPlanka: 'Log in to Planka',
|
logInToPlanka: 'Log in to Planka',
|
||||||
noInternetConnection: 'No internet connection',
|
noInternetConnection: 'No internet connection',
|
||||||
|
|
|
@ -180,6 +180,7 @@ export default {
|
||||||
addAnotherCard: 'Добавить еще одну карточку',
|
addAnotherCard: 'Добавить еще одну карточку',
|
||||||
addAnotherList: 'Добавить еще один список',
|
addAnotherList: 'Добавить еще один список',
|
||||||
addAnotherTask: 'Добавить еще одну задачу',
|
addAnotherTask: 'Добавить еще одну задачу',
|
||||||
|
addCard: 'Добавить карточку',
|
||||||
addCard_title: 'Добавить карточку',
|
addCard_title: 'Добавить карточку',
|
||||||
addComment: 'Добавить комментарий',
|
addComment: 'Добавить комментарий',
|
||||||
addList: 'Добавить список',
|
addList: 'Добавить список',
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
export default '1.21.0';
|
export default '1.21.1';
|
||||||
|
|
|
@ -31,6 +31,8 @@ services:
|
||||||
# - DEFAULT_ADMIN_NAME=Demo Demo
|
# - DEFAULT_ADMIN_NAME=Demo Demo
|
||||||
# - DEFAULT_ADMIN_USERNAME=demo
|
# - DEFAULT_ADMIN_USERNAME=demo
|
||||||
|
|
||||||
|
# - ENABLE_VERBOSE_ON_LOGIN=false # Set to true will show more verbose error messages on login. Should not be disabled without a rate limiter for security reasons.
|
||||||
|
|
||||||
# - ALLOW_ALL_TO_CREATE_PROJECTS=true
|
# - ALLOW_ALL_TO_CREATE_PROJECTS=true
|
||||||
|
|
||||||
# - OIDC_ISSUER=
|
# - OIDC_ISSUER=
|
||||||
|
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "planka",
|
"name": "planka",
|
||||||
"version": "1.21.0",
|
"version": "1.21.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "planka",
|
"name": "planka",
|
||||||
"version": "1.21.0",
|
"version": "1.21.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "planka",
|
"name": "planka",
|
||||||
"version": "1.21.0",
|
"version": "1.21.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://plankanban.github.io/planka",
|
"homepage": "https://plankanban.github.io/planka",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -22,6 +22,8 @@ SECRET_KEY=notsecretkey
|
||||||
# DEFAULT_ADMIN_NAME=Demo Demo
|
# DEFAULT_ADMIN_NAME=Demo Demo
|
||||||
# DEFAULT_ADMIN_USERNAME=demo
|
# DEFAULT_ADMIN_USERNAME=demo
|
||||||
|
|
||||||
|
# ENABLE_VERBOSE_ON_LOGIN=false # Set to true will show more verbose error messages on login. Should not be disabled without a rate limiter for security reasons.
|
||||||
|
|
||||||
# ALLOW_ALL_TO_CREATE_PROJECTS=true
|
# ALLOW_ALL_TO_CREATE_PROJECTS=true
|
||||||
|
|
||||||
# OIDC_ISSUER=
|
# OIDC_ISSUER=
|
||||||
|
|
|
@ -10,6 +10,9 @@ const Errors = {
|
||||||
INVALID_PASSWORD: {
|
INVALID_PASSWORD: {
|
||||||
invalidPassword: 'Invalid password',
|
invalidPassword: 'Invalid password',
|
||||||
},
|
},
|
||||||
|
INVALID_CREDENTIALS: {
|
||||||
|
invalidCredentials: 'Invalid credentials',
|
||||||
|
},
|
||||||
USE_SINGLE_SIGN_ON: {
|
USE_SINGLE_SIGN_ON: {
|
||||||
useSingleSignOn: 'Use single sign-on',
|
useSingleSignOn: 'Use single sign-on',
|
||||||
},
|
},
|
||||||
|
@ -40,6 +43,9 @@ module.exports = {
|
||||||
invalidPassword: {
|
invalidPassword: {
|
||||||
responseType: 'unauthorized',
|
responseType: 'unauthorized',
|
||||||
},
|
},
|
||||||
|
invalidCredentials: {
|
||||||
|
responseType: 'unauthorized',
|
||||||
|
},
|
||||||
useSingleSignOn: {
|
useSingleSignOn: {
|
||||||
responseType: 'forbidden',
|
responseType: 'forbidden',
|
||||||
},
|
},
|
||||||
|
@ -57,6 +63,9 @@ module.exports = {
|
||||||
sails.log.warn(
|
sails.log.warn(
|
||||||
`Invalid email or username: "${inputs.emailOrUsername}"! (IP: ${remoteAddress})`,
|
`Invalid email or username: "${inputs.emailOrUsername}"! (IP: ${remoteAddress})`,
|
||||||
);
|
);
|
||||||
|
if (!sails.config.custom.enableVerboseOnLogin) {
|
||||||
|
throw Errors.INVALID_CREDENTIALS;
|
||||||
|
}
|
||||||
throw Errors.INVALID_EMAIL_OR_USERNAME;
|
throw Errors.INVALID_EMAIL_OR_USERNAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,6 +75,9 @@ module.exports = {
|
||||||
|
|
||||||
if (!bcrypt.compareSync(inputs.password, user.password)) {
|
if (!bcrypt.compareSync(inputs.password, user.password)) {
|
||||||
sails.log.warn(`Invalid password! (IP: ${remoteAddress})`);
|
sails.log.warn(`Invalid password! (IP: ${remoteAddress})`);
|
||||||
|
if (!sails.config.custom.enableVerboseOnLogin) {
|
||||||
|
throw Errors.INVALID_CREDENTIALS;
|
||||||
|
}
|
||||||
throw Errors.INVALID_PASSWORD;
|
throw Errors.INVALID_PASSWORD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,8 @@ module.exports.custom = {
|
||||||
|
|
||||||
allowAllToCreateProjects: process.env.ALLOW_ALL_TO_CREATE_PROJECTS === 'true',
|
allowAllToCreateProjects: process.env.ALLOW_ALL_TO_CREATE_PROJECTS === 'true',
|
||||||
|
|
||||||
|
enableVerboseOnLogin: process.env.ENABLE_VERBOSE_ON_LOGIN ? process.env.ENABLE_VERBOSE_ON_LOGIN === 'true' : false,
|
||||||
|
|
||||||
oidcIssuer: process.env.OIDC_ISSUER,
|
oidcIssuer: process.env.OIDC_ISSUER,
|
||||||
oidcClientId: process.env.OIDC_CLIENT_ID,
|
oidcClientId: process.env.OIDC_CLIENT_ID,
|
||||||
oidcClientSecret: process.env.OIDC_CLIENT_SECRET,
|
oidcClientSecret: process.env.OIDC_CLIENT_SECRET,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue