summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoald de Vries <rdevries@thoughtworks.com>2016-11-30 15:07:52 +0100
committerRoald de Vries <rdevries@thoughtworks.com>2016-11-30 15:07:52 +0100
commita493da72d53fe90d679d7fa1980dd185415d9be3 (patch)
tree4714ff3ca827bdd5d7c70a60522285e5beaa9f25 /service
parent41f0886aeac43387dc8b4d54b1ca69f21e2ec2a8 (diff)
log a warnin when root child is not explicitly public/protected
Diffstat (limited to 'service')
-rw-r--r--service/pixelated/resources/root_resource.py5
1 files changed, 4 insertions, 1 deletions
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))