Unregister some undesired actions
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 23 Feb 2017 23:35:38 +0100
changeset 154 8b1cf160d386
parent 152 e71d858e974b
child 159 712aa8b2d0d1
Unregister some undesired actions
cubicweb_sherpa/views/__init__.py
--- a/cubicweb_sherpa/views/__init__.py	Thu Feb 23 23:24:03 2017 +0100
+++ b/cubicweb_sherpa/views/__init__.py	Thu Feb 23 23:35:38 2017 +0100
@@ -73,8 +73,13 @@
 
 
 def registration_callback(vreg):
-    from cubicweb.web.views import bookmark
-
+    vreg.register_all(globals().values(), __name__, (IndexView,))
     vreg.register_and_replace(IndexView, startup.IndexView)
-    vreg.register_all(globals().values(), __name__, (IndexView,))
+
+    from cubicweb.web.views import actions, bookmark
+    vreg.unregister(actions.ViewAction)
+    vreg.unregister(actions.MultipleEditAction)
+    vreg.unregister(actions.AddRelatedActions)
+    vreg.unregister(actions.UserPreferencesAction)
+    vreg.unregister(actions.ManageAction)
     vreg.unregister(bookmark.BookmarksBox)