Commit graph

207 commits

Author SHA1 Message Date
Alexandre Aubin
bcaf8b2e4a Move clean_session with the other session management method + add a check for session.hashed for additional security ? 2019-08-20 19:42:32 +02:00
Alexandre Aubin
65fe685a90 Get rid of this 'help' madness and more generally this three-tuppled containing various tuples and weird stuff ... use a simple dict everywhere instead 2019-08-20 05:43:17 +02:00
Alexandre Aubin
cad2cd8006 Get rid of the _format_conf madness. Instead, have clear functions to define if authentication is required, trigger the auth process if so 2019-08-20 05:43:09 +02:00
Alexandre Aubin
968667d9ed Try to improve the semantic of where/when the auth happens... 2019-08-20 03:32:52 +02:00
Alexandre Aubin
8d77fdb9a4 Cleaned unused stuff or overly complicated for no reason 2019-08-20 03:31:37 +02:00
Luke Murphy
659e20d5f5
Import DATA_DIR correctly
Fix for f6bfabc7aa.
2019-08-01 16:51:04 +02:00
Luke Murphy
dfd0868510
Use flake8 under Tox and fix complaints 2019-07-29 13:26:16 +02:00
Alexandre Aubin
1ce8ea9ffc
Merge branch 'stretch-unstable' into autopep8 2018-12-15 15:13:25 +01:00
Alexandre Aubin
8e91c0d0d3 Get rid of error_to_response and trigger 400 error for all MoulinetteErrors instead 2018-12-14 16:21:48 +00:00
Alexandre Aubin
22bfd1dbef autopep8 + a few manual tweaks 2018-12-13 19:14:29 +00:00
Alexandre Aubin
a58d4dbb87 Remove old m18n.g and errno 2018-12-12 13:54:01 +00:00
Irina LAMBLA
dcf4c8fcf0 Enh Simplify moulinette error 2018-12-12 13:37:00 +00:00
ljf
8b8296e87b [fix] Better way to calculate locale timezone 2018-12-10 01:17:04 +01:00
ljf
57602c5a1c [enh] Transform naive date into UTC aware date 2018-12-10 00:00:49 +01:00
ljf
5125d948af [enh] Display date as system timezone 2018-12-09 19:30:54 +01:00
Gabriel Corona
84c9a74d33 Protect against CSRF (#171) 2018-12-02 02:32:59 +01:00
airwoodix
3c8d8b3465 Tidy up unused imports & other minor coding style adjustments 2018-11-22 22:56:47 +01:00
Alexandre Aubin
6f9bb54542 Microdecision: prefix info messages with blue 'Info:' 2018-07-25 14:38:37 +00:00
Bram
1830b229a8
[fix] avoid cases where get_cookie returns None
Reference https://bottlepy.org/docs/dev/api.html#bottle.BaseRequest.get_cookie

Might now be the most beautiful solution ever but at least it will produce a real error message.
2018-04-29 17:17:43 +02:00
Alexandre Aubin
ab47f30f18 Forget about the old BYPASS_LOCK thing from actionmap 2017-08-13 16:40:44 -04:00
Alexandre Aubin
7b0ad0901a [enh] Show description of command in --help (#148) 2017-08-07 15:28:23 +02:00
Laurent Peuch
09f49e4a8a [mod] pep8 2017-08-05 12:03:33 +02:00
Laurent Peuch
5bf2f46f47 Merge pull request #143 from YunoHost/support-subcategories
[enh] Support subcategories
2017-08-05 11:48:22 +02:00
Laurent Peuch
1efa5c8b6e Merge pull request #145 from YunoHost/refactoring2
Remove globals variables magic and add explicit import now
2017-08-05 11:48:06 +02:00
Alexandre Aubin
0bbd47c090 Merge branch 'unstable' into support-subcategories
Conflicts:
	moulinette/actionsmap.py
2017-07-29 12:38:18 -04:00
Laurent Peuch
e9bc14845a [enh] Make ActionsMap._construct_parser code more readable (#144)
* [mod] autopep8
* [mod] remove useless try/except
* [mod] renaming + comment
* [mod] remove debug print
* [mod] more renaming
* [doc] explicit comment
* [mod] more renaming
* [mod] more renaming and comments
* [mod] more renaming
* [doc] usefull comment
* [mod] more renaming
* [mod] this is always true
* [mod] remove conditions that are always True
* [mod] more renaming
* [doc] add a comment from the docstring
* [mod] remove useless exception
* [mod] remove useless ()
* [mod] style
* [mod] it's better to fail than to silencly ignore a typo
* [mod] more renaming
* [doc] add a comment to avoid looking at yet-another-file
* [mod] renaming, make method name match reality and had a method for code readability
* [mod] remove one indirection level
* [mod] we always have actions
* [doc] add more comments
* [mod] simplify code again
* [mod] case never happen
* [mod] delegate responsability to class to make code more readable
* [mod] finish moving _add_arguments down to parsers
* [mod] invert conditions to make things more readable
* [mod] style
* [mod] remove useless exception
* [mod] simplify code
2017-07-29 17:45:36 +02:00
Alexandre Aubin
8960b1a610 [fix] Correctly handle error 500 (#142)
* [fix] Correctly handle error 500
* [fix] Remove unwanted change in error_to_response
2017-07-27 16:29:55 +02:00
Laurent Peuch
ffdb535918 [mod] simplifu code, remove global pkg object 2017-07-26 05:14:36 +02:00
Laurent Peuch
b4d36b2d3e [mod] more eleguant way of removing globals: from moulinette import m18n, pkg works 2017-07-25 21:19:51 +02:00
Laurent Peuch
863c3dd050 [mod] proposition to remove globals magic 2017-07-25 16:18:09 +02:00
Alexandre Aubin
51ea069801 [microdecision] Remove unused imports + make pep8 happy 2017-07-24 14:35:58 -04:00
Alexandre Aubin
74281816b4 Add subcategory stuff for the API to work 2017-07-23 16:16:10 -04:00
Alexandre Aubin
6a6fb89fd0 Dirty hack to be able to display 'actions' and 'subcategories' in different section in --help 2017-07-23 15:47:20 -04:00
Alexandre Aubin
c01cef3147 Adding actions to subcategory 2017-07-23 09:17:27 -04:00
Laurent Peuch
2c368596e9 [mod] remove one indirection level 2017-07-23 04:44:13 +02:00
Laurent Peuch
1caa172072 [mod] renaming, make method name match reality and had a method for code readability 2017-07-23 04:16:12 +02:00
Alexandre Aubin
e10a40657d [fix] Show positional arguments first in --help / usage (#138)
* Show positional arguments first in --help / usage
* Updating reference link
* Adding annotations about diff/tweak with respect to original code
2017-04-02 23:11:57 +02:00
Laurent Peuch
7f5e2e1b2d [fix] hotfix another bug related to the logging/log conflict 2017-01-30 05:19:50 +01:00
Laurent Peuch
93961e9aae [fix] log module was redifining constants thus breaking import 2017-01-02 03:53:15 +01:00
Laurent Peuch
23276c6941 [fix] don't circumway logging module 2016-12-22 13:26:11 +01:00
Laurent Peuch
f931976667 [mod] continue with pep8 2016-12-18 01:53:49 +01:00
Laurent Peuch
897ad08183 [mod] autopep8 2016-12-18 01:15:40 +01:00
Laurent Peuch
d8313e84aa [enh] don't timeout by default on cli 2016-12-15 13:23:15 +01:00
Laurent Peuch
f99b1e4152 [fix] forgot to add self to method signature 2016-12-03 00:27:20 +01:00
Laurent Peuch
f0541e570d [fix] syntax error in python would avoid catching excepted exception 2016-12-03 00:01:27 +01:00
Laurent Peuch
efb481bda6 [mod] increase cli timeout 2016-11-25 16:25:57 +01:00
Jérôme Lebleu
c92900edd8 [enh] Allow to define deprecated action 2016-04-16 21:26:29 +02:00
Jérôme Lebleu
802c39f117 [ref] Rename 'deprecated' action argument to 'deprecated_alias' 2016-04-16 21:04:09 +02:00
Jérôme Lebleu
a852861b2d [enh] Sort result when pretty printing result from the cli 2016-04-16 20:03:17 +02:00
Jérôme Lebleu
346e5a164f [enh] Allow to not output result from the cli 2016-04-16 20:02:01 +02:00