Customizing User model to add more details
See original GitHub issueThe user model in Superset only contains the following fields:
username
firstName
lastName
userId
isActive
email
If I want to add more (let’s say country
, location
, etc.) how would I go about it?
I looked at the UserAttribute
class, but not quite sure how to use it.
Would I need to customize the schema for ab_user
table? And if so, how can I do that?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Creating a Custom User Model in Django - TestDriven.io
This post explains step-by-step how to create a custom User model in Django so that an email address can be used as the...
Read more >Django Best Practices: Custom User Model | LearnDjango.com
Implement and add extra fields to a custom user model in Django.
Read more >How to Create a Custom Django User Model - Blog Post
1. Create a new app · 2. Create the Custom User Model in models.py · 3. Create the User model manager · 4....
Read more >Extending the User model with custom fields in Django
If you wish to store information related to User , you can use a one-to-one relationship to a model containing the fields for...
Read more >Customizing authentication in Django
You can give your models custom permissions that can be checked through Django's authorization system. You can extend the default User model, or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, can you please share the full code? we want to add a few more fields and we cannot do them into our DB. Is it possible to share the full code?
For anyone who runs into a similar issue, I resolved this by overriding the
User
class fromflask_appbuilder.security.sqla.models
.This adds
time_zone
to the schema forab_user
. After this, override theadd_user
function from classSupersetSecurityManager
. Note that if you’re implementing auth through an external OAuth provider, you’d already be doing this.