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

« back to all changes in this revision

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

  • Committer: Matt Giuca
  • Date: 2010-07-27 06:53:03 UTC
  • Revision ID: matt.giuca@gmail.com-20100727065303-gs7fn3gc3ccaqfux
Changed database schema 'semester' table. 'year' and 'semester' fields now allow any length, not just 4 or 1 respectively. (LP: #610330).

Show diffs side-by-side

added added

removed removed

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