Add can_resolve_censorship permission and uncensor feature
- Add custom permission to Photo model - Add PhotoUncensorView POST endpoint to restore private photos - Show private photos to users with can_resolve_censorship - Add restore button in lightgallery toolbar for censored photos
This commit is contained in:
parent
40352cffee
commit
f5ccb40e16
6 changed files with 71 additions and 2 deletions
|
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 5.2.13 on 2026-04-21 09:07
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('photologue', '0004_alter_photo_options_gallery_public_token'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='photo',
|
||||
options={'get_latest_by': 'date_added', 'ordering': ['title'], 'permissions': [('can_resolve_censorship', 'Can resolve censorship (restore private photos)')], 'verbose_name': 'photo', 'verbose_name_plural': 'photos'},
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue