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

« back to all changes in this revision

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

  • Committer: David Coles
  • Date: 2009-07-21 02:19:56 UTC
  • mto: (1281.1.8 aufsless)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: coles.david@gmail.com-20090721021956-c1jiwu7fhi2dna1g
Updated to work on bind mounts

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    """
36
36
    content_type = "application/octet-stream"
37
37
 
 
38
    def __init__(self, req, *args, **kwargs):
 
39
        for key in kwargs:
 
40
            setattr(self, key, kwargs[key])
 
41
 
38
42
    def render(self, req):
39
43
        raise NotImplementedError()
40
44
 
55
59
        if not hasattr(op, '_rest_api_permission'):
56
60
            raise Unauthorized()
57
61
 
58
 
        if (op._rest_api_permission not in
59
 
            self.get_permissions(req.user, req.config)):
 
62
        if op._rest_api_permission not in self.get_permissions(req.user):
60
63
            raise Unauthorized()
61
64
    
62
65
    def convert_bool(self, value):
158
161
    template = None
159
162
    ctx = genshi.template.Context()
160
163
 
 
164
    def __init__(self, req, *args, **kwargs):
 
165
        for key in kwargs:
 
166
            setattr(self, key, kwargs[key])
 
167
    
161
168
    def render_fragment(self):
162
169
        if self.template is None:
163
170
            raise NotImplementedError()