mirror of
https://github.com/deunix-educ/PyQuest.git
synced 2026-11-25 08:19:44 +01:00
Online documentation at /docs/ for authors and administrators: built into dist, nginx auth_request (check-docs), editor and admin links, Docker/server_update integration
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,11 @@ def is_author(user: object) -> bool:
|
||||
return isinstance(user, User) and user.is_active and user.has_perm(EDITOR_PERMISSION)
|
||||
|
||||
|
||||
def can_read_docs(user: object) -> bool:
|
||||
"""Documentation en ligne (/docs/) : auteurs et administrateurs (comptes `is_staff`) actifs."""
|
||||
return isinstance(user, User) and user.is_active and (user.is_staff or is_author(user))
|
||||
|
||||
|
||||
def authors_group() -> Group:
|
||||
"""Groupe « Auteurs », créé au besoin avec la permission de l'éditeur."""
|
||||
group, _created = Group.objects.get_or_create(name=GROUP_NAME)
|
||||
|
||||
Reference in New Issue
Block a user