Revision 5224c9bf lib/server/rapi.py
b/lib/server/rapi.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012, 2013 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
49 | 49 |
from ganeti import utils |
50 | 50 |
from ganeti import pathutils |
51 | 51 |
from ganeti.rapi import connector |
52 |
from ganeti.rapi import baserlib |
|
52 | 53 |
|
53 | 54 |
import ganeti.http.auth # pylint: disable=W0611 |
54 | 55 |
import ganeti.http.server |
... | ... | |
120 | 121 |
raise http.HttpNotImplemented("Method %s is unsupported for path %s" % |
121 | 122 |
(method, req.request_path)) |
122 | 123 |
|
123 |
ctx.handler_access = getattr(ctx.handler, "%s_ACCESS" % method, None)
|
|
124 |
ctx.handler_access = baserlib.GetHandlerAccess(ctx.handler, method)
|
|
124 | 125 |
|
125 | 126 |
# Require permissions definition (usually in the base class) |
126 | 127 |
if ctx.handler_access is None: |
Also available in: Unified diff