Commit graph

491 commits

Author SHA1 Message Date
Jocelyn Delalande
d3d1ddfa91 Preparing release 2.1 2018-02-16 23:18:12 +01:00
Jocelyn Delalande
131fe8a8b4 Add missing CHANGELOG and CONTRIBUTORS entries for v2.1 2018-02-16 23:17:45 +01:00
0livd
225849ac71 Docker: Fix gunicorn not using ihm system package (#320)
Fixes #319
2018-02-07 09:37:49 +01:00
0livd
d9471733f8 Fix some anti patterns in docker deployment (#321)
- Use exec to run gunicorn and avoid creating a new process.
- Add the possibility to pass any additional parameters to
gunicorn.
- Use only one gunicorn worker by default as the usual way to
scale the app in production would be to use the scale command
of the cluster scheduler. Additional workers could still be
added by passing the "-w" gunicorn parameter to docker run.
2018-02-07 09:37:21 +01:00
JocelynDelalande
667e555d67
Merge pull request #324 from JocelynDelalande/jd-stats-api
Add an API endpoint for statistics
2018-02-07 00:07:09 +01:00
Jocelyn Delalande
b95ea7f4e6 Add statistics support to API 2018-02-07 00:06:08 +01:00
Jocelyn Delalande
036cd05e57 Move member stats computation to a dedicated method 2018-02-07 00:01:13 +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
Jocelyn Delalande
389c7b8bcd Remove dead code 2018-02-06 23:59:46 +01:00
Jocelyn Delalande
cf7bd57248 Remove unused CSS odd/even classes
That was forgotten from fe39258630
2018-02-04 13:12:08 +01:00
Jocelyn Delalande
434ee8b852 Display sidebar scroll-bar only if required
This fix a regression from #316 (scrollbar was displayed all the time).

Note that the padding-bottom value is totally empiric, but proved OK on my Fx
and Chrome instances + some responsive tests. There might be finer solutions,
feel free :-).
2018-01-26 16:18:26 +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
Richard Coates
830718e1fe Make sidebar scrollable (#316)
* Make sidebar scrollable

Make sidebar scrollable.

* Update CHANGELOG.rst

Fixes #318
2018-01-25 17:34:37 +01:00
JocelynDelalande
34a2161650
Merge pull request #308 from spiral-project/almet/fix-template-inclusion-packaging
Include all .j2 files in the packaged version.
2018-01-07 23:01:34 +01:00
c24ee6f1c4 Update the CHANGELOG. 2018-01-07 22:46:07 +01:00
59ff2dd6b2 Merge branch 'almet/fix-template-inclusion-packaging' of github.com:spiral-project/ihatemoney into almet/fix-template-inclusion-packaging 2018-01-07 21:44:33 +01:00
f1e2a2d84c Add a changelog entry 2018-01-07 21:43:35 +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
3b2e11ab63 Include all .j2 files in the packaged version.
I've also renamed the templates to *.j2 in order to make things clearer
to others. Having extensions with the name of the locale doesn't seem to
be a good practice, and would need us to add the locales in the MANIFEST
file each time we add one.

Fix #305
2018-01-05 22:06:11 +01:00
donkers
4ab8863eb2 Enable basic auth passthrough for API (#303)
* Enable basic auth passthrough for API

Added the couple of apache configuration lines necessary to get the basic authentication working for the API.

* Revert the addition of "AuthType Basic"

Did some more testing on my server here and I totally agree, don't need "AuthType Basic".
2018-01-05 12:32:46 +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
Jocelyn Delalande
8fdf6407eb Back to development: 2.1 2017-12-27 19:10:00 +01:00
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