diff --git a/caravel/templates/caravel/dashboard.html b/caravel/templates/caravel/dashboard.html index d5a62cf266..9eb12e44ed 100644 --- a/caravel/templates/caravel/dashboard.html +++ b/caravel/templates/caravel/dashboard.html @@ -82,7 +82,7 @@ - + diff --git a/caravel/views.py b/caravel/views.py index 8076cb15b2..9b4ff8351f 100755 --- a/caravel/views.py +++ b/caravel/views.py @@ -1165,13 +1165,14 @@ class Caravel(BaseCaravelView): def dashboard(**kwargs): # noqa pass dashboard(dashboard_id=dash.id) - + dash_edit_perm = check_ownership(dash, raise_if_false=False) + dash_save_perm = dash_edit_perm and self.can_access('can_save_dash', 'Caravel') return self.render_template( "caravel/dashboard.html", dashboard=dash, user_id=g.user.get_id(), templates=templates, - dash_save_perm=self.can_access('can_save_dash', 'Caravel'), - dash_edit_perm=check_ownership(dash, raise_if_false=False)) + dash_save_perm=dash_save_perm, + dash_edit_perm=dash_edit_perm) @has_access @expose("/sql//")