Show More
@@ -22,7 +22,7 b' from zmq.utils import jsonapi' | |||||
22 |
|
22 | |||
23 | from IPython.utils.jsonutil import date_default |
|
23 | from IPython.utils.jsonutil import date_default | |
24 |
|
24 | |||
25 |
from ...base.handlers import IPythonHandler |
|
25 | from ...base.handlers import IPythonHandler | |
26 |
|
26 | |||
27 | #----------------------------------------------------------------------------- |
|
27 | #----------------------------------------------------------------------------- | |
28 | # Contents web service handlers |
|
28 | # Contents web service handlers | |
@@ -31,7 +31,7 b' from ...base.handlers import IPythonHandler, authenticate_unless_readonly' | |||||
31 |
|
31 | |||
32 | class ContentRootHandler(IPythonHandler): |
|
32 | class ContentRootHandler(IPythonHandler): | |
33 |
|
33 | |||
34 |
@authenticate |
|
34 | @web.authenticated | |
35 | def get(self): |
|
35 | def get(self): | |
36 | cm = self.content_manager |
|
36 | cm = self.content_manager | |
37 | contents = cm.list_contents("") |
|
37 | contents = cm.list_contents("") |
@@ -49,7 +49,7 b' class NotebookRootHandler(IPythonHandler):' | |||||
49 |
|
49 | |||
50 | class NotebookRootRedirect(IPythonHandler): |
|
50 | class NotebookRootRedirect(IPythonHandler): | |
51 |
|
51 | |||
52 |
@authenticate |
|
52 | @web.authenticated | |
53 | def get(self): |
|
53 | def get(self): | |
54 | self.redirect("/api/notebooks") |
|
54 | self.redirect("/api/notebooks") | |
55 |
|
55 |
@@ -21,7 +21,7 b' from tornado import web' | |||||
21 | from zmq.utils import jsonapi |
|
21 | from zmq.utils import jsonapi | |
22 |
|
22 | |||
23 | from IPython.utils.jsonutil import date_default |
|
23 | from IPython.utils.jsonutil import date_default | |
24 |
from ...base.handlers import IPythonHandler |
|
24 | from ...base.handlers import IPythonHandler | |
25 |
|
25 | |||
26 | #----------------------------------------------------------------------------- |
|
26 | #----------------------------------------------------------------------------- | |
27 | # Session web service handlers |
|
27 | # Session web service handlers | |
@@ -31,7 +31,7 b' from ...base.handlers import IPythonHandler, authenticate_unless_readonly' | |||||
31 |
|
31 | |||
32 | class SessionRootHandler(IPythonHandler): |
|
32 | class SessionRootHandler(IPythonHandler): | |
33 |
|
33 | |||
34 |
@authenticate |
|
34 | @web.authenticated | |
35 | def get(self): |
|
35 | def get(self): | |
36 | sm = self.session_manager |
|
36 | sm = self.session_manager | |
37 | nbm = self.notebook_manager |
|
37 | nbm = self.notebook_manager | |
@@ -57,7 +57,7 b' class SessionHandler(IPythonHandler):' | |||||
57 |
|
57 | |||
58 | SUPPORTED_METHODS = ('GET', 'PATCH', 'DELETE') |
|
58 | SUPPORTED_METHODS = ('GET', 'PATCH', 'DELETE') | |
59 |
|
59 | |||
60 |
@authenticate |
|
60 | @web.authenticated | |
61 | def get(self, session_id): |
|
61 | def get(self, session_id): | |
62 | sm = self.session_manager |
|
62 | sm = self.session_manager | |
63 | model = sm.get_session_from_id(session_id) |
|
63 | model = sm.get_session_from_id(session_id) |
@@ -38,7 +38,7 b' class ProjectDashboardHandler(IPythonHandler):' | |||||
38 |
|
38 | |||
39 | class ProjectPathDashboardHandler(IPythonHandler): |
|
39 | class ProjectPathDashboardHandler(IPythonHandler): | |
40 |
|
40 | |||
41 |
@authenticate |
|
41 | @web.authenticated | |
42 | def get(self, notebook_path): |
|
42 | def get(self, notebook_path): | |
43 | nbm = self.notebook_manager |
|
43 | nbm = self.notebook_manager | |
44 | name, path = nbm.named_notebook_path(notebook_path) |
|
44 | name, path = nbm.named_notebook_path(notebook_path) | |
@@ -56,28 +56,28 b' class ProjectPathDashboardHandler(IPythonHandler):' | |||||
56 |
|
56 | |||
57 | class TreeRedirectHandler(IPythonHandler): |
|
57 | class TreeRedirectHandler(IPythonHandler): | |
58 |
|
58 | |||
59 |
@authenticate |
|
59 | @web.authenticated | |
60 | def get(self): |
|
60 | def get(self): | |
61 | url = self.base_project_url + 'tree' |
|
61 | url = self.base_project_url + 'tree' | |
62 | self.redirect(url) |
|
62 | self.redirect(url) | |
63 |
|
63 | |||
64 | class TreePathRedirectHandler(IPythonHandler): |
|
64 | class TreePathRedirectHandler(IPythonHandler): | |
65 |
|
65 | |||
66 |
@authenticate |
|
66 | @web.authenticated | |
67 | def get(self, notebook_path): |
|
67 | def get(self, notebook_path): | |
68 | url = self.base_project_url + 'tree/'+ notebook_path |
|
68 | url = self.base_project_url + 'tree/'+ notebook_path | |
69 | self.redirect(url) |
|
69 | self.redirect(url) | |
70 |
|
70 | |||
71 | class ProjectRedirectHandler(IPythonHandler): |
|
71 | class ProjectRedirectHandler(IPythonHandler): | |
72 |
|
72 | |||
73 |
@authenticate |
|
73 | @web.authenticated | |
74 | def get(self): |
|
74 | def get(self): | |
75 | url = self.base_project_url + 'tree' |
|
75 | url = self.base_project_url + 'tree' | |
76 | self.redirect(url) |
|
76 | self.redirect(url) | |
77 |
|
77 | |||
78 | class NewFolderHandler(IPythonHandler): |
|
78 | class NewFolderHandler(IPythonHandler): | |
79 |
|
79 | |||
80 |
@authenticate |
|
80 | @web.authenticated | |
81 | def get(self, notebook_path): |
|
81 | def get(self, notebook_path): | |
82 | nbm = self.notebook_manager |
|
82 | nbm = self.notebook_manager | |
83 | name, path = nbm.named_notebook_path(notebook_path) |
|
83 | name, path = nbm.named_notebook_path(notebook_path) |
General Comments 0
You need to be logged in to leave comments.
Login now