feat: scope project access to Django Admin

This commit is contained in:
mohamad
2026-10-29 04:39:49 +08:00
parent 9a8551ae23
commit 6fd236f518
6 changed files with 489 additions and 20 deletions
+19
View File
@@ -52,6 +52,25 @@ Demo content includes:
Content created or edited by an admin is preserved on later container restarts.
## Project permissions in Django Admin
Published projects remain visible to everyone on the public website. Project
permissions apply only inside Django Admin. Users with Staff status can open the
admin panel; by default, each staff user can view and edit only main projects
and sub-projects they created. Main and sub-projects have independent access.
A superuser can configure a user under **Admin → Users → [user]**:
- **Project access policy**: own projects (default), no projects by default,
view all, or view and edit all.
- **Project access overrides**: choose one main project or sub-project per row
and set no access, view only, or view and edit. An override wins over the
default and the all-projects policy.
Project articles and videos inherit the permissions of their parent project.
Existing projects without a recorded creator remain accessible to superusers;
assign access overrides for other staff users as needed.
## Optional configuration
Copy `.env.example` to `.env` only when you want to override the local defaults: