Grégoire Delattre 3bcbd4e992 Fix alert after the user is logged
If the user enters the wrong password the first time and then login, he
will be prompted with an error.
This commit fixes this behaviour.
2019-07-18 12:52:10 +02:00
2019-05-09 11:46:47 +00:00
2019-06-21 13:14:51 +02:00
2019-07-15 12:34:56 +02:00
2019-07-15 10:29:44 +00:00
2019-07-15 10:29:44 +00:00
2017-03-20 14:35:40 +00:00
2019-07-05 17:02:46 +02:00
2019-05-27 15:06:46 +02:00
2019-05-20 12:13:46 +00:00
2019-07-05 17:02:46 +02:00

Install dependencies

Install node

You'll need node v6+, here's a link to install it: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

Install yarn and dependencies

sudo npm install -g yarn
yarn install

Dev

Check your config.yml file

Setup your database

Install your own database or spawn one in a docker

./dev.sh docker-db up -d

Run the backend

./dev.sh back

In case of custom database, launch the backend with DB_USER, DB_PASS, DB_DATABASE, DB_HOST, DB_PORT, or directly the full DSN in DB_DSN_DEV

DB_DSN_DEV="postgres://test:test@127.0.0.1:5432/dev?sslmode=disable" ./dev.sh back

Run the frontend

./dev.sh front

Connect to the database

docker run -it --rm -e PGPASSWORD=test --link canape_postgresql_dev:postgres postgres:9.5 psql -h postgres -U test -d dev

Setup the dev users

Connect to the database and enter this sql queries:

INSERT INTO users (name, hash, admin, activated) VALUES ('test', '$2a$10$QHx07iyuxO1RcehgtjMgjOzv03Bx2eeSKvsxkoj9oR2NJ4cklh6ue', false, true);
INSERT INTO users (name, hash, admin, activated) VALUES ('admin', '$2a$10$qAbyDZsHtcnhXhjhQZkD2uKlX72eMHsX8Hi2Cnl1vJUqHQiey2qa6', true, true);

This users are defined with this parameters: pepper: "pepper" cost: 10

Users:

  • Admin user: admin / admin
  • Test user: test / test

Init the database

./dev.sh db-init

Run the tests

go test ./...
Description
No description provided
Readme 13 MiB
Languages
Go 50.1%
JavaScript 46.1%
PLpgSQL 1.7%
Shell 1.2%
SCSS 0.8%
Other 0.1%