[PATCH 3 of 3 sherpa] Unregister some undesired actions

Sylvain Thenault sylvain.thenault at logilab.fr
Fri Feb 24 07:32:56 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1487889338 -3600
#      Thu Feb 23 23:35:38 2017 +0100
# Node ID 53e64623b2a04e38cacee676e238f1ee5ab1fb71
# Parent  e71d858e974bac14434c0da21f758e9638a6d757
Unregister some undesired actions

diff --git a/cubicweb_sherpa/views/__init__.py b/cubicweb_sherpa/views/__init__.py
--- a/cubicweb_sherpa/views/__init__.py
+++ b/cubicweb_sherpa/views/__init__.py
@@ -71,10 +71,14 @@ class SherpaReqRewriter(urlrewrite.Simpl
         ('/seda', dict(vid='sherpa.seda')),
     ]
 
 
 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_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.UserPreferencesAction)
+    vreg.unregister(actions.ManageAction)
     vreg.unregister(bookmark.BookmarksBox)


More information about the saem-devel mailing list