Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

User management interface for admins #61

Open
iaincollins opened this issue Jan 6, 2018 · 1 comment
Open

User management interface for admins #61

iaincollins opened this issue Jan 6, 2018 · 1 comment

Comments

@iaincollins
Copy link
Owner

iaincollins commented Jan 6, 2018

Considering adding a user admin interface to view and manage user accounts.

This would require server side routes and multiple page views (a user list and an edit view at a minimum) but could be very useful for creating useful projects very quickly.

iaincollins added a commit that referenced this issue Jan 17, 2018
* Added an admin view (/admin) and API end point to list users (/admin/users) and link to it in the user menu to anyone signed in who has “admin”: true set in their profile (issue #61).
* Admin view uses react-bootstrap-table.
* Refactored session component to move it into `models/session.js `- alongside the new `models/user.js` - as it’s just a generic ES6 class, not specifically a React component.
* Refactored the loader into a component - by default displays as as a block where ever it is placed, but also supports a fullscreen={true} option.
* Reset default body font size to 1em as larger values made tables look larger than they needed to be as was unnecessary.
@iaincollins
Copy link
Owner Author

If you configure a MongoDB for Users and set "admin": true in your profile in the DB you can now access a simple read-only admin-only view, which calls a JSON endpoint at /admin/users.

user-admin

It uses react-bootstrap-table and supports pagination.

The intention is to update this to be more full featured, but for now it's a useful starting point for anyone who wants to build their own admin UI.

If anyone would like to add views for viewing and editing users I'd welcome pull requests!

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

No branches or pull requests

1 participant