Commit graph

468 commits

Author SHA1 Message Date
Jocelyn Delalande
b9d1a9c450 Preparing release 2.0 2017-12-27 19:09:05 +01:00
Jocelyn Delalande
d00f99b7ef Add missing entry to ChangeLog 2017-12-27 19:04:47 +01:00
JocelynDelalande
2dd7a0740a
Merge pull request #299 from spiral-project/fix-duplicate-member-validation
Fix duplicate member validation
2017-12-27 19:00:09 +01:00
JocelynDelalande
1c9120e68b Silent stderr output during app init for some commands (#293)
Avoid confusing the user for the commands outputing text to the user.

fix #277
2017-12-27 17:28:18 +01:00
867f77905b Require flask-rest 1.3 minimum.
Fixes #294
2017-12-27 17:26:16 +01:00
9fea0ffe2c Add tests for #294 2017-12-27 17:06:46 +01:00
JocelynDelalande
f2a53eb1e3 Position flash messages with CSS rather than JS (#292)
Visual result is exactly the same, but less black magic :-).
2017-12-27 16:10:29 +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
0189313c1f Remove un-needed sidebar block (#291)
{% block sidebar %} is used by sidebar_table_layout.html and its children, not by
layout.html nor its direct children.

This is dead code removal.
2017-12-23 01:38:12 +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
JocelynDelalande
5160dac4a5 Replace some CSS by some JS (#288) 2017-12-21 20:35:18 +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
JocelynDelalande
0dfb9c5f94 Add missing properties in API docs (#287)
* Mention weights in API doc

Because this is reality :-)

* Mention balance property in API doc

Still because this is reality.
2017-12-21 13:56:25 +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
974485690c Add a database revision makefile recipe (#281) 2017-11-02 22:38:58 +01:00
5c645a5b0b Print out when pip is missing. 2017-11-01 22:29:16 +01:00
JocelynDelalande
16465846ce
Merge pull request #279 from JocelynDelalande/jd-upgrade-doc
Add an upgrade guide
2017-11-01 21:52:08 +01:00
Jocelyn Delalande
59fc6e0d78 Add an upgrade guide
fix #274
2017-11-01 21:51:47 +01:00
9d67c32a84
Parse requirements.txt in setup.py. Fix #273 (#284) 2017-11-01 18:36:44 +01:00
9d7376d46b
Add some information about Yunohost in the documentation. (#283) 2017-11-01 18:36:25 +01:00
Lucas Verney
0453599752 Update installation doc to include doc about production values, fix #266. (#282) 2017-11-01 01:56:05 +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
b4961f646a Add a DockerFile (#272)
Can be used to deploy the latest version from
PyPI in a production environment or from the
master branch in a dev environment.
2017-10-25 23:37:55 +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
74e9af59e6 Fix Travis-CI integration (#276)
Use tox-travis to solve the current issues with Travis-CI
2017-10-23 22:58:04 +02:00
JocelynDelalande
e3285bef36 Enhance install process by generating config files from templates (#275)
* Add a command to generate configuration examples

Config files are generated from templates (which remplace previous example files).

- solve the issue of hard-to-explain configuration examples
- ease pkg path seeking (avoid it, actually)
- add working defaults for sqlite and unix socket paths (instead of
  /replace/me/path/example)
- move settings comments from default_settings.py to ihatemoney.cfg.j2, as it is
  the one that will be facing user.

* Use generate-config command  in install doc

Also follow the new working defaults of templates for socket and db path.

* Fix doc settings table

On the long term, plaintext tables might destroy humanity.

* Mention templates dir URL in documentation

As requested by @almet
2017-10-23 18:05:50 +02:00
0livd
efd2b66ac6 Do not import the whole werkzeug pkg (#271) 2017-09-07 11:02:12 +02:00
JocelynDelalande
6ccf86919e Normalize changelog (#265)
* Fix RST markup

This was formatted as markdown while this is a .rst

* Mention Issue/PR numbers in ChangeLog

* Rephrase changelog entries to be more succint

And clearer, IMHO.

* Move changes to Changed section.

* Remove redundant entry
2017-09-06 15:01:44 +02:00
JocelynDelalande
2964b8958c BREAKING CHANGE: Rename supervisor program (#268)
To match `budget` name disparition (package got renamed in #243).

This should be mentioned in upgrade guide.

ref #243 #264
2017-09-06 10:27:04 +02:00
JocelynDelalande
40dda53607 Fix default SQLALCHEMY_DATABASE_URI value in doc (#267)
Reality-sync with default_settings.py

Not fixing the whole table layout because

- my text editor doesn't do it ;
- I'm too lazy ;
- #251 is IMHO the real way to this issue :)
2017-09-06 10:26:48 +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
JocelynDelalande
ee1ecbf3e7 Add doc building instructions (#263) 2017-08-24 17:00:58 +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
JocelynDelalande
68e4114735 Streamline installation doc, now using pip (#252)
* Fix conf files to reflect module renaming

Python module was renamed budget → ihatemoney (see #243 and 6923367).
Now, "budget" relates to nothing.

* Harmonize `APPLICATION_ROOT` doc with other settings

* Fix link markup

* Switch documentation to recomend pip over git

- Update installation instruction
- Clearly separate dev setup from installation
- Some rewordings/section-ization by the way

* Add a hint on how to find the static path

This is a downside on the pip choice over git for installation.

We will have to ease that a bit. By doc or by code, before next release.

* Make the nginx deployment doc more accurate

* Add a big fat warning about SECRET_KEY in doc
2017-08-20 12:25:57 +02:00
0livd
a0d4917ac4 Fix misplaced datepicker configuration (#258)
Bootstrap-datepicker is only included in the
list_bills template but its configuration was
living in the layout template, leading to a
javascript error on every page except list_bills.

Fixes #256
2017-08-20 12:22:47 +02:00
0livd
75104d9c19 Add python 3.6 support (#259)
Closes #253
2017-08-20 12:21:59 +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
0e374cd5e0 Make all imports relative (#229)
* Make all imports relative

* Change the way the application runs in the Makefile

* Import the default settings relatively

* Fix manage.py imports
2017-06-28 21:36:02 +02:00
0livd
603ac10d6e Turn the WSGI file into a python module (#240)
* Turn the WSGI file into a python module

* Update conf files to use the new wsgi module

Apache and gunicorn now use the same entrypoint

* Update Changelog
2017-06-28 00:04:47 +02:00
0livd
2ad4ef5466 Remove unused option in the setup script (#239)
Additionnal files to be distributed along
with the sources are already specified in
the MANIFEST.in file thus the package_data
entry in the setup script can be safely removed
2017-06-27 23:11:52 +02:00
JocelynDelalande
ce90ff0ffd Merge pull request #226 from spiral-project/rename-delete-to-deactivate
Rename delete to deactivate for members. Fixes #177
2017-06-27 19:52:07 +02:00
9adc48b50d Warn user when using default 'not-so-secret' secret-key. 2017-06-27 08:06:38 +02:00
0livd
a836085448 Use a hashed password for ADMIN_PASSWORD (#236)
* Use a hashed password for ADMIN_PASSWORD

A generate_password_hash manage.py command is provided
Fixes #233

* Print a console warning for users using a clear text ADMIN_PASSWORD

* Reword ADMIN_PASSWORD doc

* Update changelog

* Update CHANGELOG.rst

- say it out loud
- bump to 2.0 (that's the logic of semantic versioning while introducing breaking changes)

* Bump to 2.0 (breaking change)

* Update hashed password warning message

* Mention the generate password hash in the Changelog
2017-06-27 00:16:32 +02:00
a585a73d8b Explain better what is a deactivation of a member, per @JocelynDelalande's review 2017-06-26 22:59:22 +02:00
db29648956 Re-organize the documentation (#223)
* Re-organize the documentation

* Fix encoding errors for python 2

* Document the dependencies. Fixes #199

* Add a make update command. Fixes #211
2017-06-21 14:03:16 +02:00
Lucas Verney
93235cfc50 Add meta viewport tag. Fixes #219. (#231) 2017-06-21 14:02:56 +02:00