~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/tos/__init__.py

Implement an authorization system in the new framework. This breaks the REST
views, but the rest have authorization information now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
class TermsOfServiceView(XHTMLView):
29
29
    """Static view of the Terms of Service."""
 
30
    def authorize(self, req):
 
31
        return req.user is not None
 
32
 
30
33
    def populate(self, req, ctx):
31
34
        ctx['text'] = ivle.util.get_terms_of_service()
32
35