– L'utilisateur a le droit 'write-everywhere'
– C'est un topic de news et l'utilisateur a le droit 'write-news'
— Ce n'est pas un topic de news et le topic est une feuille de l'arbre
du forum
Je me rends compte que c'est foireux pour la gestion des permissions.
Faudra reprendre ça pour faire quelque chose de plus modulable…
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.
With this change, URLs for forum listings are now available. This
includes URLs like /news or /projects/games. Each of them show a
(currently empty) forum index.
Note that URLs that are not linked to in the forum index, namely URLs
for forums that have children (eg. /forum/news), are still accessible. We
could ban this by raising ValidationError if the forum has a non-empty
[sub_forums] attribute but displaying all subjects feels better.
URLs that point to /forum, but do not name a sub-forum and are not of
the form of a topic URL produce 404 errors.
This commit adds a forum tree YAML file (URL-based rather than an
actual tree...) and the 'forums' and 'create-forums' commands for
the master script.
A page /admin/forums is also used to currently display the forum
tree, although this will probably be turned into a full table with
forum descriptions, and a form with edition capabilities.
Issue n° #23 Fixer le temps d'une session par cookie (Remember me)
Corrigé, par l'ajout d'une option dans le fichier de configuration et
du code pour gèrer ça.
Les comptes GLaDOS et PlanèteCasio sont automatiquement ajoutés au
groupe "No login", qui empêche l'utilisateur de se connecter, et ce même
si les identifiants sont corrects.
- remove `title` attribute
- do the migration of db
- add initialization routine in `master.py`
- add default trophies and titles in `data/trophies.yaml`
- add `add_trophy` method in `Member` class
- add `update_trophies` method in `Member` class
- add form in admin panel to give a trophy to a member
- same to remove a trophy
- change `if request.method == "POST"` to `if form.submit.data`