Attribute annotations and scene saves to users
Server-authoritative attribution: on each scene PUT the server diffs incoming annotation groups and stamps createdBy/editedBy (+ timestamps) from request.user, ignoring client-sent stamps so authorship can't be forged. Each save also writes a Revision (user, time, +N ~N −N summary, snapshot of the annotation layer), visible in the admin and via /revisions/. Projects gain collaborators so several users can edit one project and get distinct attribution. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
57ef570539
commit
36054ac329
8 changed files with 187 additions and 7 deletions
20
scenes/migrations/0003_project_collaborators.py
Normal file
20
scenes/migrations/0003_project_collaborators.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Generated by Django 6.0.6 on 2026-06-29 04:11
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('scenes', '0002_revision'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='project',
|
||||
name='collaborators',
|
||||
field=models.ManyToManyField(blank=True, related_name='shared_projects', to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue