-
Notifications
You must be signed in to change notification settings - Fork 15.1k
feat(User Registrations): Migrate user registrations fab view #33631
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
base: template_less
Are you sure you want to change the base?
Conversation
…tend file update feat: add an api endpoint feat(UserRegistrations): Working copy
Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment
|
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.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
Category | Issue | Status |
---|---|---|
Sensitive Registration Hash Exposure ▹ view | 🧠 Not in standard | |
Missing documentation for registration_hash field ▹ view | 🧠 Not in scope | |
Untyped Table Cell Components ▹ view | 🧠 Incorrect | |
Delete Modal Closes on Error ▹ view | 🧠 Not in scope | |
Unformatted Date Display ▹ view | 🧠 Incorrect |
Files scanned
File Path | Reviewed |
---|---|
superset/views/user_registrations.py | ✅ |
superset-frontend/src/views/routes.tsx | ✅ |
superset/security/api.py | ✅ |
superset-frontend/src/pages/UserRegistrations/index.tsx | ✅ |
superset/initialization/init.py | ✅ |
superset/security/manager.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
list_columns = [ | ||
"id", | ||
"username", | ||
"email", | ||
"first_name", | ||
"last_name", | ||
"registration_date", | ||
"registration_hash", | ||
] |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
export type UserRegistration = { | ||
id: number; | ||
username: string; | ||
first_name: string; | ||
last_name: string; | ||
email: string; | ||
registration_date: string; | ||
registration_hash: string; | ||
}; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
const columns = useMemo( | ||
() => [ | ||
{ | ||
accessor: 'username', | ||
id: 'username', | ||
Header: t('Username'), | ||
Cell: ({ row: { original } }: any) => original.username, | ||
}, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
const handleUserRegistrationDelete = async ({ | ||
id, | ||
username, | ||
}: UserRegistration) => { | ||
try { | ||
await SupersetClient.delete({ | ||
endpoint: `/api/v1/user_registrations/${id}`, | ||
}); | ||
refreshData(); | ||
setUserRegistrationCurrentlyDeleting(null); | ||
addSuccessToast(t('Deleted user registration for user: %s', username)); | ||
} catch (error) { | ||
addDangerToast( | ||
t('There was an issue deleting registration for user: %s', username), | ||
); | ||
} | ||
}; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
accessor: 'registration_date', | ||
id: 'registration_date', | ||
Header: t('Registration date'), | ||
Cell: ({ row: { original } }: any) => original.registration_date, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@geido Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
@geido Ephemeral environment spinning up at http://44.248.206.145:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
label=__("User Registrations"), | ||
category="Security", | ||
category_label=__("Security"), | ||
icon="fa-user-plus", |
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.
Let's remove this
Thanks for this! Let's fix conflicts and let's put it behind the registrations enablement feature flag |
SUMMARY
Move user registrations fab view to frontend for themeability.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:


After:
TESTING INSTRUCTIONS
Here's a sample config to access the page:
ADDITIONAL INFORMATION