Is there any way via which we can create new Roles Programmatically in Superset. I have checked the docs but can't find any hooks to create the roles programmatically.
I use Superset as a python library, and got the same problem a few months ago...
first you have to create a Custom Security Manager... to do this i read this tutorial https://programmer.group/tutorial-how-to-integrate-superset-in-your-own-application.html
Essentially you make the call from your superset_config.py file like this
from core_utils.security import CustomSecurityManager
CUSTOM_SECURITY_MANAGER = CustomSecurityManager
In the init method of the CustomSecurityManager() you can make the call to add_role() function... this do the trick
--
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.