-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
feat(api): add role, permission, user APIs #21053
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though would like to get @dpgaspar sign off before merging
superset/initialization/__init__.py
Outdated
from flask_appbuilder.security.sqla.apis import PermissionApi, PermissionViewMenuApi, \ | ||
RoleApi, UserApi, ViewMenuApi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
from flask_appbuilder.security.sqla.apis import PermissionApi, PermissionViewMenuApi, \ | |
RoleApi, UserApi, ViewMenuApi | |
from flask_appbuilder.security.sqla.apis import ( | |
PermissionApi, | |
PermissionViewMenuApi, | |
RoleApi, | |
UserApi, | |
ViewMenuApi, | |
) |
I think best way to enable these is just by enabling |
e325b56
to
ce41ac1
Compare
ce41ac1
to
f74945c
Compare
Hello, I've changed the commit for @mayurnewase 's comment, and I set FAB_ADD_SECURITY_API flag to False by default. See changes and review this. Thanks & Regards |
f74945c
to
9b1bf50
Compare
If you just enable the flag, you won't need to add those apis in superset's init. |
@mayurnewase You are right. We can just enable it by setting FAB_ADD_SECURITY_API to True. So I think that we no longer need this PR by the way. Do you mind if I close this PR? P.S. I used these APIs since Superset 1.4 by importing dpgaspar/Flask-AppBuilder#1801 locally only for using them. So it happens like that. Sorry for taking your time. Thanks. |
Sure no problem, happy to help. |
@mayurnewase, That's great. I've been thinking of you said "add the flag in the config with little description". and I'm glad to add this flag later for other Superset users. I going to close it now. Have a nice day :) Thanks. |
SUMMARY
Integrate role, permission, user APIs on Flask-AppBuilder into Apache Superset
See #21050
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
These APIs can be used on Apache Superset Web Service. See the screenshot below.
![스크린샷 2022-08-11 오후 2 59 57](https://user-images.githubusercontent.com/5166067/184073700-5915bf94-1ae6-493f-a1ba-861fb315e9e8.png)
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION