You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by gr...@apache.org on 2018/06/18 22:08:07 UTC

[incubator-superset] branch master updated: [CRUD] disable user change slices from dashboardmodelview (#5217)

This is an automated email from the ASF dual-hosted git repository.

graceguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 480ddfc  [CRUD] disable user change slices from dashboardmodelview (#5217)
480ddfc is described below

commit 480ddfc7adecc6add94f10780c3303904475cf30
Author: Grace Guo <gr...@airbnb.com>
AuthorDate: Mon Jun 18 15:08:03 2018 -0700

    [CRUD] disable user change slices from dashboardmodelview (#5217)
---
 superset/views/core.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/superset/views/core.py b/superset/views/core.py
index 0ceefe7..753c538 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -530,9 +530,9 @@ class DashboardModelView(SupersetModelView, DeleteMixin):  # noqa
     list_columns = ['dashboard_link', 'creator', 'modified']
     order_columns = ['modified']
     edit_columns = [
-        'dashboard_title', 'slug', 'slices', 'owners', 'position_json', 'css',
+        'dashboard_title', 'slug', 'owners', 'position_json', 'css',
         'json_metadata']
-    show_columns = edit_columns + ['table_names']
+    show_columns = edit_columns + ['table_names', 'slices']
     search_columns = ('dashboard_title', 'slug', 'owners')
     add_columns = edit_columns
     base_order = ('changed_on', 'desc')
@@ -555,10 +555,6 @@ class DashboardModelView(SupersetModelView, DeleteMixin):  # noqa
         'owners': _('Owners is a list of users who can alter the dashboard.'),
     }
     base_filters = [['slice', DashboardFilter, lambda: []]]
-    add_form_query_rel_fields = {
-        'slices': [['slices', SliceFilter, None]],
-    }
-    edit_form_query_rel_fields = add_form_query_rel_fields
     label_columns = {
         'dashboard_link': _('Dashboard'),
         'dashboard_title': _('Title'),