~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: 2009-07-04 13:40:44 UTC
  • mto: (1294.4.2 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20090704134044-b5n1zaq6l325cc7a
Security (login/logout) done.

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
29
28
        self.context = context
30
29
        if self.subpath_allowed:
31
30
            self.subpath = subpath
33
32
    def render(self, req):
34
33
        raise NotImplementedError()
35
34
 
36
 
    def get_permissions(self, user, config):
37
 
        return self.context.get_permissions(user, config)
 
35
    def get_permissions(self, user):
 
36
        return self.context.get_permissions(user)
38
37
 
39
38
    def authorize(self, req):
40
 
        self.perms = self.get_permissions(req.user, req.config)
 
39
        self.perms = self.get_permissions(req.user)
41
40
 
42
41
        return self.permission is None or self.permission in self.perms