mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Prefix internal attributes with underscore
This commit is contained in:
parent
4f6a342211
commit
e07df9fd1d
12 changed files with 65 additions and 66 deletions
|
@ -257,10 +257,10 @@ def xml_item_response(base_prefix, href, found_props=(), not_found_props=(),
|
|||
class ApplicationReportMixin:
|
||||
def do_REPORT(self, environ, base_prefix, path, user):
|
||||
"""Manage REPORT request."""
|
||||
if not self.access(user, path, "r"):
|
||||
if not self._access(user, path, "r"):
|
||||
return httputils.NOT_ALLOWED
|
||||
try:
|
||||
xml_content = self.read_xml_content(environ)
|
||||
xml_content = self._read_xml_content(environ)
|
||||
except RuntimeError as e:
|
||||
logger.warning(
|
||||
"Bad REPORT request on %r: %s", path, e, exc_info=True)
|
||||
|
@ -273,7 +273,7 @@ class ApplicationReportMixin:
|
|||
item = next(self._storage.discover(path), None)
|
||||
if not item:
|
||||
return httputils.NOT_FOUND
|
||||
if not self.access(user, path, "r", item):
|
||||
if not self._access(user, path, "r", item):
|
||||
return httputils.NOT_ALLOWED
|
||||
if isinstance(item, storage.BaseCollection):
|
||||
collection = item
|
||||
|
@ -288,4 +288,4 @@ class ApplicationReportMixin:
|
|||
logger.warning(
|
||||
"Bad REPORT request on %r: %s", path, e, exc_info=True)
|
||||
return httputils.BAD_REQUEST
|
||||
return (status, headers, self.write_xml_content(xml_answer))
|
||||
return (status, headers, self._write_xml_content(xml_answer))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue