[Checkins] SVN: grokcore.startup/branches/ipython-debug-shell/src/grokcore/startup/debug.py display security information

Christian Klinger cvs-admin at zope.org
Fri Apr 27 09:46:51 UTC 2012


Log message for revision 125322:
  display security information

Changed:
  U   grokcore.startup/branches/ipython-debug-shell/src/grokcore/startup/debug.py

-=-
Modified: grokcore.startup/branches/ipython-debug-shell/src/grokcore/startup/debug.py
===================================================================
--- grokcore.startup/branches/ipython-debug-shell/src/grokcore/startup/debug.py	2012-04-27 09:18:28 UTC (rev 125321)
+++ grokcore.startup/branches/ipython-debug-shell/src/grokcore/startup/debug.py	2012-04-27 09:46:48 UTC (rev 125322)
@@ -1,5 +1,4 @@
 #######################################################################
-# Copyright (C) 2009  Ruslan Spivak
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,6 +20,8 @@
 import transaction
 import zope.app.wsgi
 import zope.app.debug
+from pprint import pprint
+from zope.securitypolicy.zopepolicy import settingsForObject
 
 from IPython.frontend.terminal.embed import InteractiveShellEmbed
 shell = InteractiveShellEmbed()
@@ -60,6 +61,7 @@
                     app=self.app,
                     root=self.root,
                     ctx=self.ctx,
+                    security=self.get_security_settings,
                     sync=self.sync,
                     providedBy=self.providedBy,
                     commit=self.commit)
@@ -67,6 +69,9 @@
     def update_ns(self):
         shell.user_ns.update(self.ns())
 
+    def get_security_settings(self):
+        pprint(settingsForObject(self.ctx))
+
     def sync(self):
         self.root._p_jar.sync()
 
@@ -194,6 +199,7 @@
           cdg / ;cdg
           lsg / ;lsg
           providedBy
+          security
           pwdg
           sync
           commit



More information about the checkins mailing list