Commit graph

31 commits

Author SHA1 Message Date
Alexis Métaireau
870987fd37 Trim member usernames. Fixes #353
(cherry picked from commit 82d94a7490)
2020-06-07 21:22:48 +02:00
01cf56559b Update requirements.txt 2019-09-06 23:59:05 +02:00
Brice Maron
9c9832704d bill list: add placeholder and disable add bill when no members 2019-09-06 22:00:39 +02:00
Brice Maron
0edf8634a4 Move export form to links 2019-08-26 19:59:55 +00:00
d55b996170
Do not allow negative weights on users (Fixes #362) (#366) 2019-01-03 13:29:56 +01:00
Byron Ullauri
04adfe4155 Provide basic math operations on bills (#413)
* allow basic math ops in amount field for bills form
* docs: changing compile-translations to build-translations
2019-01-03 10:03:13 +01:00
Byron Ullauri
7cb339c0bb Resolve "Update API project list" (#409)
* refactoring models _to_serialize property

* updated project api members list

* addressing flake8: line too long
2018-12-26 19:07:09 +01:00
620596e32c
Add CORS to the API. Fix #404 (#407) 2018-12-25 18:13:58 +01:00
Lucas Verney
0428cf06b5 Add bill.creation_date field (#327) 2018-12-25 16:50:14 +01:00
c34583d079
Add a ihatemoney delete-project command. (#375) 2018-09-03 20:55:44 +02:00
Glandos
c1b5eb1375 Remove strict_slashes for /
I don't know why, but on my setup (nginx + uwsgi), the `strict_slashes` (default to `True`) was causing an infinite loop.
I think it could be safely removed for this route only.
2018-08-05 14:57:55 +02:00
Jocelyn Delalande
b95ea7f4e6 Add statistics support to API 2018-02-07 00:06:08 +01:00
Jocelyn Delalande
b1a4572e8c Change statistics data structure
Clearer data structure, and simpler template

This commit has a side effect: sidebar now hides disabled members.

IMHO, the disabled members should either be hidden or shown consistently between
sidebar and central table. Previous status was: shown in sidebar (if balance ≠
0) and hidden in central table.
2018-02-07 00:01:13 +01:00
0livd
b93ea4830d API: Migrate from flask-rest to flask-restful (#315)
The flask-rest custom json encoder is still needed
and thus was added to ihatemoney's utils.

Closes #298
2018-01-25 17:41:28 +01:00
JocelynDelalande
2019b398f1 manage commands testing (#313)
* Rename manage.ConfigTemplate → manage.GenerateConfig

To be consistent with the CLI name: `generate-config`.

* Add tests for manage.py commands

* Run tests from pip-installed package

To be able to detect packaging-related issues on test runs.

refs #305
2018-01-07 00:27:42 +01:00
JocelynDelalande
c002cdbf94 Allow to disable/enable member via API (#301)
Disable was already (kind-of) possible via API via DELETE, but not re-enabling.

Kudos to @almet for helping me fixing that damn BooleanField :-)
2017-12-29 18:07:39 +01:00
Jocelyn Delalande
40e5a833a1 Fix tests layout so that API tests are not ran twice
Bad inheritance was causing APITestsCase tests to be ran twice.
2017-12-27 23:27:41 +01:00
9fea0ffe2c Add tests for #294 2017-12-27 17:06:46 +01:00
JocelynDelalande
4d359ce11b Fix PUT api/project/:code/members/:id (#297)
* Fix PUT api/project/:code/members/:id

Before that commit, every PUT *must* change the name of the members, so that was :
- no idempotence,
- no ability to change only weight

fix #295

* Remove redundant comment
2017-12-27 15:58:40 +01:00
JocelynDelalande
b65ee59b1b Remove API password (#290)
* Remove the password from API GET responses

While keeping it for POST/PUT.

fix #289

* Add a test to check password change via API
2017-12-22 17:39:48 +01:00
0livd
c6f72e112b Use hashed passwords for projects (#286)
- Remove all occurences of clear text project passwords.
- Migrate the database to hash the previously stored passwords.
Closes #232
2017-12-21 13:57:01 +01:00
0livd
8a68ac0d5b Use token based auth in invitation e-mails (#280)
* Use token based auth in invitation e-mails

Invitation e-mails no longer contain the clear
text project password

* Skip invite page after project creation

- Replace ``The project identifier is demo, remember it!``
by ``Invite other people to join this project!``
(linking to the invite page)
- Encourage users to share the project password via other
communication means in the reminder email
2017-12-15 17:10:28 +01:00
Alexandre Avenel
2866c868d5 Fix some typos using codespell (#285) 2017-11-11 18:11:15 +01:00
0livd
b94bad829c Use token based auth to reset passwords (#269)
Send a mail containing a password reset
token link instead of sending a clear text
password.

Ref #232
2017-10-26 19:46:34 +02:00
0livd
293735eca7 Make authentication logic simpler and safer (#270)
* Fixed exposed password in session

The project password was set in clear text
in the session cookie. The cookie payload is
only base64 encoded so it must not be used to
store private information. The password is
simply replaced by a boolean.

* Simplify authentication logic
2017-10-23 23:03:44 +02:00
0livd
7a918c9349 Enhance the dashboard. (#262)
* Update to a more flexible admin authentication
* Admin can now access any project
* Add delete and edit options in the dashboard
* Add a link to the dashboard in the nav bar

This is a rework of the changes proposed by @Olivd, so they can apply on top of
the latest master without trouble. All credit goes to him for the code.
2017-09-04 15:44:20 +02:00
0livd
2ec4fb589f Add a statistics tab (#257) 2017-08-21 23:51:32 +02:00
0livd
ec4a099f18 Protect admin endpoints against brute force attacks (#249)
* Protect admin endpoints against brute force attacks

Add a throttling mechanism to prevent a client brute
forcing the authentication form, based on its ip address
Closes #245

* Reset attempt counters if they get memory hungry
2017-08-20 12:37:12 +02:00
0livd
c7815e4878 Fix #248: Database creation issue (#254)
In flask's development server, the route handlers
run in a different thread than the main thread
thus an in-memory database created in the main thread
cannot be acccessed by the route handlers.
Switching the default database location to a temporary
file solves the isssue.

See full explanation here:
https://gehrcke.de/2015/05/in-memory-sqlite-database-and-flask-a-threading-trap/
2017-08-06 04:06:21 +02:00
0livd
8fd53f827e Revert configuration tests deletion (#250)
Some supernatural power erased the configuration
tests, they're now back !
2017-07-09 22:29:57 +02:00
3a4282fd75 Absolute imports & some other improvements (#243)
* Use absolute imports and rename package to ihatemoney
* Add a ihatemoney command
* Factorize application creation logic
* Refactor the tests
* Update the wsgi.py module with the new create_app() function
* Fix some styling thanks to Flake8.
* Automate Flake8 check in the CI.
2017-07-07 00:06:56 +02:00
Renamed from budget/tests/tests.py (Browse further)