forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: "Impersonate user" setting on Datasource (apache#3404)
* Add "Impersonate user" setting to Datasource * Add tests * Use g.user.username for all the sync cases * use uri.username instead of uri.user * Small refactoring
- Loading branch information
1 parent
335952c
commit f5855db
Showing
6 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
superset/migrations/versions/a9c47e2c1547_add_impersonate_user_to_dbs.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"""add impersonate_user to dbs | ||
Revision ID: a9c47e2c1547 | ||
Revises: ca69c70ec99b | ||
Create Date: 2017-08-31 17:35:58.230723 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'a9c47e2c1547' | ||
down_revision = 'ca69c70ec99b' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
op.add_column('dbs', sa.Column('impersonate_user', sa.Boolean(), nullable=True)) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column('dbs', 'impersonate_user') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters