Skip to content

Commit

Permalink
fix: Localization of permission checks on deleting (#7683)
Browse files Browse the repository at this point in the history
* Permission in the german version have sometimes german names.

* change django-cms to cms

* Remove specific German locale test

* Update pageadmin.py

* Undo renaming

---------

Co-authored-by: wintergruen <dirk.wintergruen@klassik-stiftung.de>
Co-authored-by: Fabian Braun <fsbraun@gmx.de>
  • Loading branch information
3 people committed Nov 29, 2023
1 parent d031da3 commit 22d6869
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cms/admin/pageadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@ def delete_view(self, request, object_id, extra_context=None):
)

# This is bad and I should feel bad.
if 'placeholder' in perms_needed:
if _('placeholder') in perms_needed:
perms_needed.remove('placeholder')

if 'page content' in perms_needed:
if _('page content') in perms_needed:
perms_needed.remove('page content')

if request.POST and not protected: # The user has confirmed the deletion.
Expand Down

0 comments on commit 22d6869

Please sign in to comment.