Code Repositories xandikos / 526534a
List principals on root page. Jelmer Vernooń≥ 1 year, 3 months ago
2 changed file(s) with 14 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
44 <body>
55 <p>This is a Xandikos WebDAV server.</p>
66
7 <p>Principals on this server:
8 <ul>
9 {% for name in principals %}
10 <li><a href="{{ name }}/">{{ name }}</a></li>
11 {% endfor %}
12 </ul>
13 </p>
14
715 <p>For more information about Xandikos, see <a
816 href="https://www.xandikos.org/">https://www.xandikos.org/</a>
917 or <a href="https://github.com/jelmer/xandikos">https://github.com/jelmer/xandikos</a>.
588588 content_types = webdav.pick_content_types(
589589 accepted_content_types, ['text/html'])
590590 assert content_types == ['text/html']
591 return render_jinja_page('root.html', accepted_content_languages)
591 return render_jinja_page('root.html', accepted_content_languages,
592 principals=self.backend.find_principals())
592593
593594 def get_body(self):
594595 raise KeyError
775776 self._mark_as_principal(relpath)
776777 if create_defaults:
777778 create_principal_defaults(self, principal)
779
780 def find_principals(self):
781 """List all of the principals on this server."""
782 return self._user_principals
778783
779784 def get_resource(self, relpath):
780785 relpath = posixpath.normpath(relpath)