Commit Graph

68 Commits

Author SHA1 Message Date
Lephe b047ed97af
programs: program creation + view + comments
This is very much a work in progress, but the main ideas are here.

[MIGRATION] This commit contains a new version of the schema.
2022-05-19 20:34:46 +01:00
Lephe 5a87d29c7f
account: make default avatar selection less hacky 2022-05-05 20:33:45 +01:00
Darks faf5bd184d
navbar: properly generate links to recent topics 2022-04-26 20:40:56 +02:00
Lephe 262c5f22c8
navbar: fix links to news forums under "Actualités" 2022-04-26 15:15:30 +01:00
Darks 87d795959f
less (#97): first shot to Less
Quick switch, still may need some refacto and delete unused code
2021-07-14 16:30:45 +02:00
Lephe f75f1618bc
add a developer warning for slow requests (#63) 2021-07-07 18:42:17 +02:00
Eragon 6cbf5a51f9
Implémentation du "skip to content" #94 2021-04-28 19:30:41 +02:00
Darks 87ef91b9e3
login_as: add function to login as arbitrary account 2021-03-05 23:56:03 +01:00
Lephe 6f98cba65e
review of privileges and forum permissions
* Sorted privileges into categories, similar to the v4.3 style

Added privilege check utilities:
* Forum: is_news(), is_default_accessible() and is_default_postable()
* Member: can_access_forum(), can_post_in_forum(), can_edit_post(),
  and can_delete_post()

Unfortunately current_user is not a Guest when logged out, so one
cannot usually write current_user.can_*() without checking for
authentication first, so the checks are still somewhat verbose.

Reviewed forum permissions; the following permission issues have been
fixed (I have tested most but not all of them prior to fixing):

* app/routes/forum/index.py: Users that were not meant to access a
  forum could still obtain a listing of the topics
* app/routes/forum/topic.py: Users that were not meant to see topics
  could still read them by browsing the URL
* app/routes/forum/topic.py: Authenticated users could post in any
  topic, including ones that they should not have access to
* app/routes/posts/edit.py: Users with edit.posts (eg. mods) could edit
  and delete messages in forums they can't access (eg. creativecalc)

* app/templates/account/user.html: Users with admin panel access would
  see account editing links they can't use (affects developers)
* app/templates/base/navbar/forum.html: The "Forum" tab would list all
  forums including ones the user doesn't have access to
* app/templates/forum/index.html: Users would see every single forum,
  including ones they can't access
* app/template/widgets/thread.html: Anyone would see Edit/Delete links
  on every message, even though most were unusable

Miscellaneous changes:
* app/routes/forum/topic.py: Ordered comments by date as intended,
  which I assume worked by chance until now
* Removed the old assets/privs.txt files which is now superseded by the
  list implemented in app/data/groups.yaml

This commit changes group and forum information, run master.py with:
@> forums update
@> groups update
2021-02-26 18:32:45 +01:00
Eldeberen fabad32955
polls: add a panel to manage own polls 2021-02-20 01:28:08 +01:00
Eragon 227087ebbc
Issue #76 Refactoriser les messages flash
Javascript :
Supression du javascript inutile, l'entièreté du bloc du flash.

CSS :
Alignement plus correct des notifications flash, fini le fixed, 15%
place au margin auto.
Ajout d'une marge pour éviter l'effet «bloc».
Héritage des propriétés de couleur du texte et du fond de la classe supèrieure.

Modification des templates :
Les messages sont désormais chargés avant le contenu et après le header.
2020-10-01 22:16:15 +02:00
Darks 0d8dd70956
security: add CSRF protection globally
The decorator @check_csrf can be used to check CSRF protection when 
using GET links (like delete a post or logout)
2020-09-26 14:48:30 +02:00
Darks 77bcb99ea1
account: ADD mot de passe oublié 2020-07-21 22:12:18 +02:00
Darks 1ef055f629
enhancement: added modularity to converters 2020-07-17 00:17:11 +02:00
Lephe 17c78204a6
update the route model for the forum to <id>/<page>/<slug>
This works by bundling the topic object and page number in a pair during
conversion to/from URL, so that the slug can be computed effortlessly
and put in all links.
2020-07-16 23:58:21 +02:00
Darks f24d81b778
Merge branches comptes-fin-de-siderbar 2020-07-16 19:13:58 +02:00
Darks e3cdf6f0af
enhancement: moved account icon to bottom of navbar 2020-07-16 19:12:21 +02:00
Quentin Guidée 19678084dd
Déplace accounts à la fin de la navbar 2020-07-15 16:00:06 +02:00
Darks 04fb3225c1
refactor: passage aux variables CSS4 2020-07-13 22:54:34 +02:00
Darks e0e02d5423
Fix de merde n°2 2019-12-17 10:14:37 +01:00
Darks 83d5a0b385
Typo --' 2019-12-17 10:13:22 +01:00
Darks 4b8ce0334a
Ajout d'une favicon :D 2019-12-17 10:10:51 +01:00
Darks 9341c5883c
Premier jet sur les avatars 2019-12-09 23:24:05 +01:00
Darks 4427688193
Amélioration du menu
Les derniers topics redirigent automatique sur la dernière page du topic
2019-12-07 16:38:45 +01:00
Darks da96de2f14
Ajout d'un premier jet d'éditeur Js de LightScript 2019-12-04 22:16:29 +01:00
Darks cf61b43e17
Modification de la liste des topics actifs du menu
+ Correction de bugs
2019-12-04 13:58:48 +01:00
Darks e99e45b4ca
Modifications majeures du rendu du menu
- Les context processors sont dans un dossier à part
- Ajout du dynamisme dans le menu (récupération des derniers messages de 
topic)
2019-12-04 01:16:16 +01:00
Darks 087dd56cb2
Retiré le mode fixed du menu version mobile 2019-12-03 12:54:28 +01:00
Darks d4e1b05c29
Divers correctifs
- Le menu est utilisable sans Js (penser à mettre à jour les endpoints)
- Réorganisation des templates
- Ajout d'une page listant les outils
2019-11-28 14:14:35 +01:00
Lephe 8a0ba309e0
forum: restructure models and add topic creation
This changes fixes #25 by restructuring the forum models in a way
compatible with the polymorphic behavior of SQLAlchemy. Incidentally,
the new form turns out to be more appropriate for our use than the
polymorphic one originally used.

The migration for this task is non-trivial because the Thread class was
created with a foreign-key id which thus had no auto-increment or
associated sequence. The most reliable way of getting it back was to
recreate the table because SQLAlchemy ony performs automated sequence
introduction at table creation time. Four separate migration files
perform the whole change.

This commit also adds views and forms to create topics, and the
boilerplate for an advanced markup editor that can be used as a widget.
2019-09-09 08:11:38 +02:00
Lephe 9f30bd36a0
forum: add the forum index page
Also prepare some functions for topic listings for each forum.
2019-09-09 08:11:38 +02:00
Darks de83f09024
Ajout d'un logo plus petit pour ne pas charger le gros en permanence
Dans l'idéal faudrait même faire une version svg
2019-09-08 23:10:28 +02:00
Darks 035e4f9062
Corrections de style
Cf post 
https://www.planet-casio.com/Fr/forums/lecture_sujet.php?id=15836&page=last#168760
2019-09-08 22:38:19 +02:00
Darks 7971e47522
Debug sur notifs, ajout du nombre dans le menu latéral
L'affichage du nombre de notifs méritera peut être un coup de peinture… 
À voir.
2019-09-01 22:33:00 +02:00
Darks 15a4d38ea0
Ajout des notifications 2019-09-01 12:30:41 +02:00
Darks 4868774b96
Test d'intégration continue 2019-09-01 00:32:20 +02:00
Darks 201e961ba2
Ajout des stats sur la durée de chargement 2019-08-20 18:07:16 +02:00
Darks 6980e5e85f
Ajout des URL vers la forge et le wiki 2019-08-10 20:28:35 +02:00
Darks 3133f5f814 Correction de #8 2019-06-05 01:51:14 +02:00
Dark-Storm d482d1a6fb
Modification de la fonction render
- Ajout d'un modificateur pour changer les feuilles de style à la volée
2019-04-17 12:25:24 +02:00
Lephe 9291855c87 style: improvements on forms and responsiveness 2019-03-31 12:17:55 +02:00
Lephe b3ffd132f9 style: minor changes, leave Raleway 2019-03-31 09:40:33 +02:00
Lephe 05b9328888 minor code and style edits 2019-03-30 22:37:57 +01:00
Dark-Storm 0c4f0f6748
Modifications en vrac
Dans User.valid_name, ajout de caractères non autorisés. Voir #19 pour
faire quelque chose de vraiment propre et safe.
Dans privs, j'ai shooté des règles en double. Répercussion sur les
autres routes.
Ajout du champ username dans le formulaire admin de modif d'un compte.
2019-02-11 00:15:09 +01:00
Dark-Storm 7745dc332f
Réinsertion du footer dans le <container> 2019-02-10 20:58:52 +01:00
Lephe 7921bb5765 privs: create privileges from groups and users
The groups-privileges page takes care of removing privileges
before deleting groups and users; this is to be moved soon to a
proper group/user deletion API.
2019-02-10 15:46:53 +01:00
Lephe 255fe82032 reponsive: clean up light.css 2019-02-10 10:03:11 +01:00
lephe 78b4299207 responsive: unify common style and light.css (WIP)
This includes loading the common style sheets at low resolutions
and removing the undescribable redundancy in light.css.

The harder part was getting the navbar right, because it relied
heavily on the distinction between navbar.css and light.css.

This is still a work in progress.
2019-02-09 22:42:16 +01:00
lephe 9fe1104b45 admin: more on user and group generation
Also more titles and details on other pages of
the administration section.
2019-02-09 21:18:12 +01:00
lephe 9faabea997 templates: slightly restructure and improve design 2019-02-09 11:32:08 +01:00