Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create users if not found. #1753

Merged
merged 3 commits into from
Dec 6, 2016
Merged

Create users if not found. #1753

merged 3 commits into from
Dec 6, 2016

Conversation

bkyryliuk
Copy link
Member

@bkyryliuk bkyryliuk commented Dec 3, 2016

This change will allow to pre-create and preassign users to the groups before they login to the superset. It will allow users to have full access once they are logged in to the tool.

Reviewers:

@bkyryliuk bkyryliuk changed the title Create users if not found. WIP. Create users if not found. Dec 5, 2016
username=user_data['username'],
first_name=user_data['username'],
last_name=user_data['username'],
email=user_data['username'],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we using username as email?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo :) will improve the unit test

'usernames': ['gamma'],
'users': [{
'username': 'gamma',
'email': '[email protected]'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm guessing this email won't actually get used to send email, but should we use the airbnb domain instead just in case it does and superset.com has a catchall email address setup? looks like a parked domain currently.

could use [email protected]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the email field, actually we plan to send emails for the access requests )

if not user and user_data['username']:
sm.add_user(
username=user_data['username'],
first_name=user_data['username'],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does user_data have a first/last name available?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, I'll do it more generic, we do not have the data.

@ascott
Copy link

ascott commented Dec 5, 2016

probably want @mistercrunch do take a quick look, but LGTM!

@mistercrunch
Copy link
Member

LGTM

@bkyryliuk bkyryliuk merged commit 69702e3 into apache:master Dec 6, 2016
@bkyryliuk bkyryliuk deleted the sync_roles_and_create_users branch December 6, 2016 01:04
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.15.0 labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants