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

johnbodley 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 6e0d1b8  chore: cleanup FAB update perms (#11155)
6e0d1b8 is described below

commit 6e0d1b840983df65eb10fa9ef89fbc0b1430d10b
Author: John Bodley <[email protected]>
AuthorDate: Wed Oct 7 08:33:41 2020 -0700

    chore: cleanup FAB update perms (#11155)
    
    * chore: Using cache factory method
    
    * chore: Deprecate outdated FAB_UPDATE_PERMS information
    
    Co-authored-by: John Bodley <[email protected]>
---
 UPDATING.md                                      |  2 ++
 docs/installation.rst                            | 17 -----------------
 docs/src/pages/docs/installation/configuring.mdx | 16 ----------------
 superset/app.py                                  |  1 -
 4 files changed, 2 insertions(+), 34 deletions(-)

diff --git a/UPDATING.md b/UPDATING.md
index ac696cd..34ac367 100644
--- a/UPDATING.md
+++ b/UPDATING.md
@@ -23,6 +23,8 @@ assists people when migrating to a new version.
 
 ## Next
 
+* [11155](https://github.com/apache/incubator-superset/pull/11155): The 
`FAB_UPDATE_PERMS` config parameter is no longer required as the Superset 
application correctly informs FAB under which context permissions should be 
updated.
+
 * [10887](https://github.com/apache/incubator-superset/pull/10887): Breaking 
change: The custom cache backend changed in order to support the Flask-Caching 
factory method approach and thus must be registered as a custom type. See 
[here](https://flask-caching.readthedocs.io/en/latest/#custom-cache-backends) 
for specifics.
 
 * [10674](https://github.com/apache/incubator-superset/pull/10674): Breaking 
change: PUBLIC_ROLE_LIKE_GAMMA was removed is favour of the new 
PUBLIC_ROLE_LIKE so it can be set it whatever role you want.
diff --git a/docs/installation.rst b/docs/installation.rst
index 3f8784c..a832dc2 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -276,23 +276,6 @@ server (`superset run` or `flask run`) is not intended for 
production use.
 If not using gunicorn, you may want to disable the use of flask-compress
 by setting `COMPRESS_REGISTER = False` in your `superset_config.py`
 
-Flask-AppBuilder Permissions
-----------------------------
-
-By default, every time the Flask-AppBuilder (FAB) app is initialized the
-permissions and views are added automatically to the backend and associated 
with
-the ‘Admin’ role. The issue, however, is when you are running multiple 
concurrent
-workers this creates a lot of contention and race conditions when defining
-permissions and views.
-
-To alleviate this issue, the automatic updating of permissions can be disabled
-by setting `FAB_UPDATE_PERMS = False` (defaults to True).
-
-In a production environment initialization could take on the following form:
-
-  superset init
-  gunicorn -w 10 ... superset:app
-
 Configuration behind a load balancer
 ------------------------------------
 
diff --git a/docs/src/pages/docs/installation/configuring.mdx 
b/docs/src/pages/docs/installation/configuring.mdx
index 9e58a4d..94c4521 100644
--- a/docs/src/pages/docs/installation/configuring.mdx
+++ b/docs/src/pages/docs/installation/configuring.mdx
@@ -65,22 +65,6 @@ you can add the endpoints to `WTF_CSRF_EXEMPT_LIST`:
 WTF_CSRF_EXEMPT_LIST = [‘’]
 ```
 
-### Flask AppBuilder Permissions
-
-By default, every time the Flask-AppBuilder (FAB) app is initialized the 
permissions and views are
-added automatically to the backend and associated with the ‘Admin’ role. The 
issue, however, is when
-you are running multiple concurrent workers this creates a lot of contention 
and race conditions
-when defining permissions and views.
-
-To alleviate this issue, the automatic updating of permissions can be disabled 
by setting
-`FAB_UPDATE_PERMS = False` (defaults to True).
-
-In a production environment initialization could take on the following form:
-
-```
-superset init gunicorn -w 10 … superset:app
-```
-
 ### Running on a WSGI HTTP Server
 
 While you can run Superset on NGINX or Apache, we recommend using Gunicorn in 
async mode. This
diff --git a/superset/app.py b/superset/app.py
index e5aa287..f74da1b 100644
--- a/superset/app.py
+++ b/superset/app.py
@@ -552,7 +552,6 @@ class SupersetAppInitializer:
         appbuilder.indexview = SupersetIndexView
         appbuilder.base_template = "superset/base.html"
         appbuilder.security_manager_class = custom_sm
-        appbuilder.update_perms = False
         appbuilder.init_app(self.flask_app, db.session)
 
     def configure_url_map_converters(self) -> None:

Reply via email to