Преглед изворни кода

Closes #154: /calendar url need to be logged

Bastien Sevajol (Algoo) пре 8 година
родитељ
комит
a5527dadeb
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      tracim/tracim/controllers/calendar.py

+ 2 - 0
tracim/tracim/controllers/calendar.py Прегледај датотеку

@@ -2,6 +2,7 @@
2 2
 import re
3 3
 import tg
4 4
 from tg import tmpl_context
5
+from tg.predicates import not_anonymous
5 6
 
6 7
 from tracim.lib.base import BaseController
7 8
 from tracim.lib.calendar import CalendarManager
@@ -16,6 +17,7 @@ class CalendarController(BaseController):
16 17
     """
17 18
 
18 19
     @tg.expose('tracim.templates.calendar.iframe_container')
20
+    @tg.require(not_anonymous())
19 21
     def index(self):
20 22
         user = tmpl_context.identity.get('user')
21 23
         dictified_current_user = Context(CTX.CURRENT_USER).toDict(user)