~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: 2009-12-15 03:01:52 UTC
  • Revision ID: matt.giuca@gmail.com-20091215030152-osh0kpeei5ejr9ru
fileservice_lib/action: Removed redundant assignments to svnclient.callback_get_login.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    """
22
22
    Abstract base class for all view objects.
23
23
    """
 
24
 
 
25
    subpath_allowed = False
 
26
 
 
27
    def __init__(self, req, context, subpath=None):
 
28
        self.context = context
 
29
        if self.subpath_allowed:
 
30
            self.subpath = subpath
 
31
 
24
32
    def render(self, req):
25
33
        raise NotImplementedError()
26
34
 
28
36
        return self.context.get_permissions(user)
29
37
 
30
38
    def authorize(self, req):
31
 
        perms = self.get_permissions(req.user)
 
39
        self.perms = self.get_permissions(req.user)
32
40
 
33
 
        return self.permission is None or self.permission in perms
 
41
        return self.permission is None or self.permission in self.perms