Commit Graph

25 Commits

Author SHA1 Message Date
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
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 e3cdf6f0af
enhancement: moved account icon to bottom of navbar 2020-07-16 19:12:21 +02:00
Darks 04fb3225c1
refactor: passage aux variables CSS4 2020-07-13 22:54:34 +02:00
Darks 9341c5883c
Premier jet sur les avatars 2019-12-09 23:24:05 +01: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 3133f5f814 Correction de #8 2019-06-05 01:51:14 +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 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
Dark-Storm eca5fe488b
Ajouts dans le panel admin 2019-02-06 12:44:44 +01:00
Dark-Storm 584b1188d8
Grosses modifs sur le design. Ajout des routes /user 2019-02-05 23:21:46 +01:00
Dark-Storm 2089a09753
Ajout du support des avatars. Y'a un peu de nettoyage sur le chemin de stockage 2019-02-04 23:21:29 +01:00
Dark-Storm a51f2265b1
Ajout de la recherche. Modif des redirections de login 2019-02-03 14:57:30 +01:00
lephe 2311c7f3d8 users: review code and expand a little
Nothing ground-breaking here, but lays the ground for
later expansions.
2019-02-03 11:12:01 +01:00
Dark-Storm 89e64cd48f
Petite modif 2019-02-02 14:04:14 +01:00
Dark-Storm 52aee800f9
Ajout de la page de gestion du compte, correction de bugs & autres 2018-11-15 23:13:15 +01:00
Dark-Storm 2ebcf5e1ec
Modifications générales du style, finalisation du formulaire d'inscritpion 2018-11-12 23:27:49 +01:00
Dark-Storm f3d355b3da
Création du diagramme de classes. Modifications mineures des templates 2018-09-16 23:14:07 +02:00
Dark-Storm 1f003d4e64
Refonte du menu, ajout des alertes 2018-02-26 10:24:16 +01:00