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

« back to all changes in this revision

Viewing changes to ivle/webapp/base/views.py

  • Committer: William Grant
  • Date: 2010-02-15 03:45:04 UTC
  • Revision ID: grantw@unimelb.edu.au-20100215034504-hwpkwo6m1184jkni
Document publication of documentation to the website.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    subpath_allowed = False
26
26
 
27
27
    def __init__(self, req, context, subpath=None):
 
28
        self.req = req
28
29
        self.context = context
29
30
        if self.subpath_allowed:
30
31
            self.subpath = subpath
32
33
    def render(self, req):
33
34
        raise NotImplementedError()
34
35
 
35
 
    def get_permissions(self, user):
36
 
        return self.context.get_permissions(user)
 
36
    def get_permissions(self, user, config):
 
37
        return self.context.get_permissions(user, config)
37
38
 
38
39
    def authorize(self, req):
39
 
        self.perms = self.get_permissions(req.user)
 
40
        self.perms = self.get_permissions(req.user, req.config)
40
41
 
41
42
        return self.permission is None or self.permission in self.perms