From commits-return-698-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Wed Feb 28 02:43:43 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1CBD8180651 for ; Wed, 28 Feb 2018 02:43:42 +0100 (CET) Received: (qmail 8449 invoked by uid 500); 28 Feb 2018 01:43:42 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 8439 invoked by uid 99); 28 Feb 2018 01:43:42 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2018 01:43:42 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 8D96E817E6; Wed, 28 Feb 2018 01:43:41 +0000 (UTC) Date: Wed, 28 Feb 2018 01:43:41 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: check for access before requesting access (#4469) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151978222142.19695.11960520335501649452@gitbox.apache.org> From: maximebeauchemin@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: c2b42c49c6af373a40d90b4f27591bebec3b9924 X-Git-Newrev: 8626793655e2d0ecf9896d0f214f962dc20e4665 X-Git-Rev: 8626793655e2d0ecf9896d0f214f962dc20e4665 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. maximebeauchemin 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 8626793 check for access before requesting access (#4469) 8626793 is described below commit 8626793655e2d0ecf9896d0f214f962dc20e4665 Author: timifasubaa <30888507+timifasubaa@users.noreply.github.com> AuthorDate: Tue Feb 27 17:43:37 2018 -0800 check for access before requesting access (#4469) --- superset/views/core.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/superset/views/core.py b/superset/views/core.py index c8101b8..5b0ee5f 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -842,6 +842,15 @@ class Superset(BaseSupersetView): .one() ) datasources.add(datasource) + + has_access = all( + ( + datasource and self.datasource_access(datasource) + for datasource in datasources + )) + if has_access: + return redirect('/superset/dashboard/{}'.format(dashboard_id)) + if request.args.get('action') == 'go': for datasource in datasources: access_request = DAR( -- To stop receiving notification emails like this one, please contact maximebeauchemin@apache.org.