GitHub user rtobi1204 created a discussion: Extend user profile in production

I would like to extend the user profile in superset to enable row-level 
security. For this, I want to add a field to ab_user. In principle, this is 
similar to the documented user case for department in 
https://superset.apache.org/admin-docs/security/#row-level-security. I want to 
add a group id where multiple users can have the same group id in their 
userprofile. The group id is available as a dataset column. In the end, the 
requirement is use enable row-level security using the group id. However, the 
constraint is that my superset instance is already live. Hence, from what I 
understand I cannot simply extend models.py with something like the following
``` 
extraSecrets:
  models.py: |
    from flask_appbuilder.security.sqla.models import User
    from sqlalchemy import Column, Integer, ForeignKey, String, Sequence, Table
    from sqlalchemy.orm import relationship, backref
    from flask_appbuilder import Model

    class CustomUser(User):
        __tablename__ = 'ab_user'
        department = Column(String(256))
```
I understand that this would require to run db migration but db migration only 
runs on first startup. Are there documented steps to extend ab_user with 
additional attributes when superset is already live? Thank you!

GitHub link: https://github.com/apache/superset/discussions/40025

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to