Commits

Esa-Matti Suuronen committed 82d5afe

Correctly call permissions.utils.has_permission

  • Participants
  • Parent commits b32a5f8

Comments (0)

Files changed (1)

File permissions/templatetags/permissions_tags.py

         self.nodelist_false = nodelist_false
 
     def render(self, context):
-        obj = context.get("obj")
+        obj = context.get("lfc_context")
         request = context.get("request")
-        if permissions.utils.has_permission(self.permission, request.user, obj):
+        if permissions.utils.has_permission(obj, request.user, self.permission):
             return self.nodelist_true.render(context)
         else:
             return self.nodelist_false