From a493da72d53fe90d679d7fa1980dd185415d9be3 Mon Sep 17 00:00:00 2001 From: Roald de Vries Date: Wed, 30 Nov 2016 15:07:52 +0100 Subject: log a warnin when root child is not explicitly public/protected --- service/pixelated/resources/root_resource.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'service/pixelated') diff --git a/service/pixelated/resources/root_resource.py b/service/pixelated/resources/root_resource.py index 3f09848f..7d5b0b0a 100644 --- a/service/pixelated/resources/root_resource.py +++ b/service/pixelated/resources/root_resource.py @@ -95,7 +95,10 @@ class RootResource(BaseResource): def putChildProtected(self, path, resource): return BaseResource.putChild(self, path, UnAuthorizedResource() if self._public else resource) - putChild = putChildProtected + + def putChild(self, path, resource): + logger.warn('Use either `putChildPublic` or `putChildProtected` on this resource') + return self.putChildProtected(path, resource) # to be on the safe side def initialize(self, provider=None, disclaimer_banner=None, authenticator=None): self.putChildProtected('sandbox', SandboxResource(self._static_folder)) -- cgit v1.2.3