Commit Graph

26 Commits

Author SHA1 Message Date
Lephe 1837f8f9a6
forum: anti-bot fields for guest topics and comments (#51) 2021-07-10 12:30:12 +02:00
Lephe 05f56a1cf4
forum: improve attachment inputs and allow edition (#49) 2021-07-08 16:50:28 +02: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 5958605d2b
forum: fix message for necropost warning 2021-02-21 20:29:55 +01:00
Eldeberen f10d5404c2
forum: fix #84 2021-02-21 20:17:48 +01:00
Eragon 4ddf60353c
#84 Passage du dernier post en cas de nécropost 2021-01-12 17:30:54 +01:00
Eragon c0ae3cc8ab
#84 Confirmation anti-nécropost 2021-01-12 16:40:52 +01:00
Lephe 36ccb16536
thread: use the thread widget for top comments
This allows the top comment to be permalinked and edited as any comment,
following the intent of pinning normal comments to the top.
2020-10-31 15:35:00 +01:00
Darks e308fca0ba
templates: added a widget for threads
It will be used for program comments, etc.
2020-09-26 11:56:07 +02:00
Darks 5253f8ec8f
post edition: added redirection to topic (#49)
Beware that the urlparse method may return unsafe results… IDK
2020-09-24 23:25:25 +02:00
Darks 9409113167
markdown: add markdown rendering 2020-09-18 19:43:10 +02:00
Darks 554898db87
attachments: merged attachments system into dev 2020-08-01 21:47:25 +02:00
Darks 56a584c535
attachments: added attachments system
Still need some work on it…
2020-08-01 21:26:06 +02:00
Lephe 7e11469183
forum: add basic comment edition with preview
Limitations:
* Works only for registered users
* Does not redirect to the proper MainPost page
* Does not check permissions
2020-08-01 17:30:44 +02:00
Lephe 79600e8598
templates: add a dynamic date format
More reader-friendly (in French at least).
2020-08-01 15:44:47 +02:00
Darks 48dd2b982b
widget-user: ajout de la polymorphie au widget 2020-07-21 18:45:06 +02:00
Darks 34bc74b8e5
feat(forum): ajout du post invité sur les topics (#36)
- Encore une fois, penser à faire ces ACL… (#40)
2020-07-18 07:52:29 +02:00
Darks e6c1545031
feature: ajout du post en tant qu'invité
- Pour les commentaires seulement
- Ajout d'une option pour désactiver (antispam)
- Penser à faire les ACL rapidement…
- Un poil de CSS pour l'intégration du bouzin
2020-07-17 23:49:04 +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 04fb3225c1
refactor: passage aux variables CSS4 2020-07-13 22:54:34 +02:00
Darks 1e618fafd1
Ajout des permaliens sur les commentaires de topic 2019-12-17 13:16:06 +01:00
Darks b4341ed0f8
Ajout de la pagination pour les topics de forum 2019-12-07 16:34:39 +01:00
Darks a2e408daf9
Ajout du load dynmaique des messages (#39) 2019-12-07 16:06:00 +01:00
Eragon 90ac259177
Ajout de la date de publication et de modification d'un post 2019-12-05 17:14:40 +01:00
Eragon 134eaa4d58
Ajout du style et d'un peut d'affichage pour les topics
J'ai fait mon possible pour que ça rende bien et que le css ne soit pas
trop moche. Il faudra peut-être modifier légèrement l'afichage du
profil, ce dernier est pas assez bien en place à mon goût.
2019-12-03 23:13:22 +01:00
Darks 662882cc15
Ajout des commentaires de topics
On ne peut pas encore modifier le top comment ni commencer un topic à 
partir d'un thread externe, mais les bases sont là :)
2019-12-03 20:32:01 +01:00