Support schema permissions (#8219)

* Build support for schema access in Superset and SQLab

* Lint
* Test for old and new flask
* Black formatting
* Cleanup modified files
* Support schema permissions
* Add migration
* Make it work for slices as well
* TODO and remove unused field
* Apply schema access check to dashboards as well

Cleaner schema permissions check

Fetch schema permissions in 1 query

Bugfix

Better datasource check

Use security manager for permissions checks and remove dead code

Properly handle anon user

Add database permissions on the database updates

Fix schema filtering

Lint / flake changes

Increase cypress request timeout

Run black

Resolve multiple alembic heads

* Use set comprehensions

* Fixes for the pylint
This commit is contained in:
Bogdan
2019-12-03 14:57:24 -08:00
committed by Maxime Beauchemin
parent 43f637e403
commit 003e98c231
14 changed files with 775 additions and 138 deletions

View File

@@ -61,6 +61,7 @@ class BaseDatasource(AuditMixinNullable, ImportMixin):
cache_timeout = Column(Integer)
params = Column(String(1000))
perm = Column(String(1000))
schema_perm = Column(String(1000))
sql: Optional[str] = None
owners: List[User]