kopia lustrzana https://github.com/wagtail/wagtail
Don't render edit bird if user is not logged in
rodzic
ffeb98b03c
commit
cf759dbb2f
|
@ -28,6 +28,10 @@ class EditPageItem(BaseItem):
|
|||
|
||||
|
||||
def render_edit_bird(request, items):
|
||||
# Don't render if the user is not logged in
|
||||
if not request.user.is_authenticated():
|
||||
return
|
||||
|
||||
# Render the items
|
||||
rendered_items = [item.render(request) for item in items]
|
||||
|
||||
|
|
|
@ -29,4 +29,4 @@ def wagtail_edit_bird(context, current_page=None, items=None):
|
|||
fn(request, items)
|
||||
|
||||
# Render edit bird
|
||||
return edit_bird.render_edit_bird(request, items)
|
||||
return edit_bird.render_edit_bird(request, items) or ''
|
||||
|
|
Ładowanie…
Reference in New Issue