Skip to content
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

Add extra information per user in Admin panel #212

Open
cwilligv opened this issue Feb 11, 2023 · 2 comments
Open

Add extra information per user in Admin panel #212

cwilligv opened this issue Feb 11, 2023 · 2 comments

Comments

@cwilligv
Copy link

Hi there,

I have a need to add more information about the users that get permission to access an app and I was wondering if it's possible to add extra columns like name of the user in the user creation workflow. At the moment it only takes an email. I was thinking to add a call to my database where I can store the email and name when the admin creates the user from the admin console.

In the image below I would like to add a textinput for the name and in the submit button function add a call to my database and save it there. Is that possible?

image

Thanks!

@merlinoa
Copy link
Collaborator

Hi @cwilligv

Yes, you can do this, but it would require a custom admin panel which is not super simple update. See the "custom_admin_ui" argument of secure_ui() and the "custom_admin_server" function of secure_server(). You can start by copying the default admin_app that comes with polished: https://github.com/Tychobra/polished/blob/master/R/admin_app.R and pass the the admin_ui() to the "custom_admin_ui" argument of secure_ui() and the admin_server() to the "custom_admin_server" or secure_server().

You can then customize that admin panel to do anything you want, including send additional data in your database.

@cwilligv
Copy link
Author

Thank you @merlinoa , I appreciate your feedback around this. I had a look at what you've said and it's doesn't seem to be that hard, lots of updates though but you've done an excellent job with the package.
I'll give it a try in the next couple of days.
cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants