Pass on the global 'perms' object to PageTitleColumn's context

This is required for the site globe icon to show (for users with site edit permission)
pull/10626/head
Matt Westcott 2023-07-07 17:27:09 +01:00 zatwierdzone przez Matt Westcott
rodzic 99a3febcad
commit 5a0828a066
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -13,6 +13,7 @@ class PageTitleColumn(BaseColumn):
parent_context["request"].user
)
context["show_locale_labels"] = parent_context.get("show_locale_labels")
context["perms"] = parent_context.get("perms")
return context
@ -122,4 +123,5 @@ class PageTable(Table):
def get_context_data(self, parent_context):
context = super().get_context_data(parent_context)
context["show_locale_labels"] = parent_context.get("show_locale_labels")
context["perms"] = parent_context.get("perms")
return context