Commit Graph

162 Commits

Author SHA1 Message Date
Darks 7e64a70eec Merge pull request 'Ajout de la page d’accueil en préprod' (#141) from landing_page into dev
Reviewed-on: https://gitea.planet-casio.com/devs/PCv5/pulls/141
2023-07-04 21:35:58 +02:00
Lephe c8f2d73bc2
shoutbox: add standalone shoutbox at /chat 2023-06-27 22:35:42 +02:00
Darks 62341cf9d9
landing page: WIP 2023-06-23 23:41:46 +02:00
Eragon f163d15066
ldap: Update user informations in LDAP when edited from PCv5 2023-06-20 22:40:51 +02:00
Eragon 4231b3084e
member: Delete members from LDAP on account deletion 2023-06-20 20:08:41 +02:00
Darks 9902719328
Merge branch 'glados_say' of gitea.planet-casio.com:devs/PCv5 into dev 2023-06-20 19:39:49 +02:00
Darks 358a5fec9d
notifications: fixed notifications 2023-06-20 19:38:04 +02:00
Darks 12483e70e4
logging: add some logging for v5 events 2023-06-13 23:32:58 +02:00
Darks 2530581095
glados: updated announces 2023-06-12 20:04:20 +02:00
Darks 876cae2b69
glados: add some 'say' messages 2023-06-11 23:05:03 +02:00
Darks fccd0e5b84
admin: fixed priv name on polls route 2023-06-07 21:55:40 +02:00
Darks 3c671da85c
moderation: added locking capability to topics and programs 2023-06-06 21:35:29 +02:00
Darks b9becbf21f
moderation: fixed moving a post to another topic 2023-06-06 19:52:46 +02:00
Eragon 37fba5d93b
dependencies: Python 3.11 URLlib is now typed and require explicit conversion from int to str 2023-05-15 13:02:52 +02:00
Darks 8cd862078b
Rebase new_editor from dev 2022-12-17 22:58:22 +01:00
Eragon 112d06e3d6
program: Fix submission, login required and file upload 2022-12-15 19:04:30 +01:00
Eragon bcbab7033d
editor: Add preview 2022-12-14 11:22:12 +01:00
Lephe db0e42d285
programs: add tag input and display (#114)
* Add a TagListField which automatically validates its input against the
  TagInformation database, and has a richer .selected_tags() method
* Add a dynamic tag input widget, available through a macro (*import
  with context*), that supports both JS and non-JS input
* Add a TagInformation.all_tags() function
* Add colored tag display to all themes
* Fix a bug causing programs to have no names
* Add tags: games.action, games.narrative, courses.informatics

[MASTER] Run the 'update-tags' command of master.py.
2022-06-14 23:19:41 +01:00
Lephe 85323e896d
forum: fix edit timestamp recording + display
On the preproduction server there are messages that have an edit
timestamp some 20 ns after their creation, for some reason.
2022-05-26 21:24:50 +01:00
Lephe c26861527b
admin: remove trophy edition interface (#82)
It was decided to keep using the master script to update them.
2022-05-26 20:16:29 +01:00
Lephe 6756838882
forum: factor attachment creation code 2022-05-26 20:08:16 +01:00
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 7d9e897ae9
perf: optimize away special privilege requests by lazy loading 2022-05-12 19:24:17 +01:00
Lephe 5a87d29c7f
account: make default avatar selection less hacky 2022-05-05 20:33:45 +01:00
Lephe db5e613f7e
model: use methods to access a user's typed posts (#104) 2022-04-25 17:05:17 +01:00
Darks c6ef83d32c
post: add move to another thread operation (#79)
Currently only support forum
2021-07-14 19:55:16 +02:00
Lephe b9abfcfde7
forum: properly redirect topic after changing forum
The URL changes so using the referrer is not much of an option.
2021-07-12 22:33:17 +02:00
Lephe 3551103c88
forum: allow users to move topics to wherever they can write 2021-07-12 21:33:03 +02:00
Lephe be644a6e18
forum: update trophies/xp of deleted topics' contributors 2021-07-12 20:39:44 +02:00
Lephe 306f1bab64
forum: balance XP of topic creation and deletion 2021-07-12 20:05:32 +02:00
Lephe 9f0cbc810b
forum: enable topic modification
This works only after a top comment has been selected (but topics
without top comments are an anomaly of databases initialized before it
was added, so we don't care).
2021-07-12 19:08:31 +02:00
Lephe b8ed0bba99 forum: enable topic deletion
Topic modification does not work in this snapshot, this is normal.
2021-07-12 18:37:06 +02:00
Lephe 9727c2a986 forum: add an action to change the top comment of a topic
This also prepares the thread_leader macro for top comments of
topics, programs, etc. which have extra stuff to render and more
specific actions.
2021-07-12 18:37:06 +02:00
Lephe d10f9b3b48 forum: decrease XP when deleting posts (+penalty) 2021-07-12 18:37:06 +02:00
Lephe 05f56a1cf4
forum: improve attachment inputs and allow edition (#49) 2021-07-08 16:50:28 +02:00
Lephe 2aa2fd539f
clean up account forms (factor + syntax) (#70)
* Factor the update account forms (user and admin)
* Slightly cleaner syntax (I hope), also a bit shorter
2021-07-08 15:12:37 +02:00
Lephe b3d99b93f8
account: add a theme setting (#14) 2021-07-08 11:43:09 +02:00
Lephe cc5f4e481b
account: member deletion, with post anonymization (#57) 2021-07-08 10:39:22 +02:00
Lephe bee912f88c
model: add all deletion methods (except Guest/Member) 2021-07-07 21:23:35 +02:00
Lephe fe039e4092
forum: fix a bug in c59e84485 for forums with no topics
WHERE would be on its own without argument.
2021-07-07 19:22:36 +02:00
Lephe c59e844852
forum: count comments for all presented topics in a single request (#63)
It appears as though performing a lot of requests is the most costly
aspect of listing comment counts per topic; this change aims to address
that by reading all the counts in a single request.

On my computer, this changes loading times from an absolute 100-200 ms to
50-100 ms most of the time. The request impact is not easy to measure as a
couple ms is small enough to fall in the range of disk access and other
semi-random events.
2021-07-07 17:26:22 +02:00
Darks 8bdf3909ea
login_as: fixed some issues
See https://gitea.planet-casio.com/devs/PCv5/issues/90#issuecomment-1131
2021-03-06 11:36:35 +01:00
Darks 87ef91b9e3
login_as: add function to login as arbitrary account 2021-03-05 23:56:03 +01:00
Lephe 07a91c4663
admin: show group CSS on user editor 2021-02-27 11:50:40 +01:00
Lephe 1d63d05c1e
admin: show trophy icons on user editor 2021-02-27 11:42:29 +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 938516cb3f
polls: added admin panel and deletion form 2021-02-22 23:50:19 +01:00
Eldeberen d6512bb197
polls: added multi-choices polls 2021-02-22 22:49:11 +01:00
Eldeberen f10d5404c2
forum: fix #84 2021-02-21 20:17:48 +01:00
Eldeberen cd8efcced8
Merge branch 'dev' of gitea.planet-casio.com:devs/PCv5 into polls 2021-02-20 01:36:04 +01:00