Commits

Gael Pasgrimaud  committed 4f00c1d

allow use with gae

  • Participants
  • Parent commits 5fb724c

Comments (0)

Files changed (1)

File djangovideos/templatetags/video_tags.py

     The user must own ``videos.add_video permission`` to add
     videos.
     """
-    if context['user'].has_perm('djangovideos.add_video'):
+    try:
+        perm = context['user'].has_perm('djangovideos.add_video')
+    except Exception:
+        # gae
+        perm = not context['user'].is_anonymous()
+
+    if perm:
         return {
             'form': VideoForm(),
             'form_url': add_url_for_obj(obj),