Skip to content

Commit

Permalink
fix(templates): pass user to show_info
Browse files Browse the repository at this point in the history
It needs it for permission checks.
  • Loading branch information
nijel committed Oct 1, 2024
1 parent 417c663 commit 34a011d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion weblate/trans/templatetags/translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1493,8 +1493,9 @@ def list_objects_percent(
)


@register.inclusion_tag("snippets/info.html")
@register.inclusion_tag("snippets/info.html", takes_context=True)
def show_info(
context,
*,
project: Project | None = None,
component: Component | None = None,
Expand All @@ -1512,6 +1513,7 @@ def show_info(
This merely exists to be able to pass default values to {% include %}.
"""
return {
"user": context["user"],
"project": project,
"component": component,
"translation": translation,
Expand Down

0 comments on commit 34a011d

Please sign in to comment.