Skip to content
This repository

read-only notebook mode #930

Closed
wants to merge 1 commit into from

2 participants

Min RK Fernando Perez
Min RK
Owner

As requested by @fperez

When using a password, read-only mode allows unauthenticated users read-only access to notebooks. Editing, execution, etc. are not allowed in read-only mode (the buttons, shortcuts, etc. are removed, but the requests will raise authentication errors if they manage to send the events anyway), but save/print functions are available.

No kernels are started until an authenticated user opens a notebook.

Fernando Perez
Owner

@minrk, I think you pushed the wrong branch for the pr :)

Min RK
Owner
Min RK minrk closed this October 25, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 08, 2011
Min RK cp 0ea97a2
This page is out of date. Refresh to see the latest.
6  IPython/core/application.py
@@ -35,7 +35,7 @@
35 35
 
36 36
 from IPython.config.application import Application
37 37
 from IPython.config.configurable import Configurable
38  
-from IPython.config.loader import Config
  38
+from IPython.config.loader import Config, ConfigFileNotFound
39 39
 from IPython.core import release, crashhandler
40 40
 from IPython.core.profiledir import ProfileDir, ProfileDirError
41 41
 from IPython.utils.path import get_ipython_dir, get_ipython_package_dir
@@ -186,7 +186,7 @@ def load_config_file(self, suppress_errors=True):
186 186
                 base_config,
187 187
                 path=self.config_file_paths
188 188
             )
189  
-        except IOError:
  189
+        except ConfigFileNotFound:
190 190
             # ignore errors loading parent
191 191
             self.log.debug("Config file %s not found", base_config)
192 192
             pass
@@ -201,7 +201,7 @@ def load_config_file(self, suppress_errors=True):
201 201
                 self.config_file_name,
202 202
                 path=self.config_file_paths
203 203
             )
204  
-        except IOError:
  204
+        except ConfigFileNotFound:
205 205
             # Only warn if the default config file was NOT being used.
206 206
             if self.config_file_specified:
207 207
                 msg = self.log.warn
4  IPython/frontend/terminal/ipapp.py
@@ -30,7 +30,7 @@
30 30
 import sys
31 31
 
32 32
 from IPython.config.loader import (
33  
-    Config, PyFileConfigLoader
  33
+    Config, PyFileConfigLoader, ConfigFileNotFound
34 34
 )
35 35
 from IPython.config.application import boolean_flag
36 36
 from IPython.core import release
@@ -378,7 +378,7 @@ def load_default_config(ipython_dir=None):
378 378
     cl = PyFileConfigLoader(default_config_file_name, profile_dir)
379 379
     try:
380 380
         config = cl.load_config()
381  
-    except IOError:
  381
+    except ConfigFileNotFound:
382 382
         # no config found
383 383
         config = Config()
384 384
     return config
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.