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
|
|
@ -553,6 +553,9 @@ class Photo(ImageModel):
|
|||
get_latest_by = "date_added"
|
||||
verbose_name = _("photo")
|
||||
verbose_name_plural = _("photos")
|
||||
permissions = [
|
||||
("can_resolve_censorship", "Can resolve censorship (restore private photos)"),
|
||||
]
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue