clojars / clojars-web

A community repository for open-source Clojure libraries
https://clojars.org
Eclipse Public License 1.0
468 stars 114 forks source link

Build an Admin UI #847

Closed tobias closed 1 year ago

tobias commented 1 year ago

The primary administrative task currently is verifying group names, We have helpers in the clojars.admin namespace (check-and-verify-group!, verify-group!) to handle that, but they require a repl with access to the production database. This is currently done by connecting to the server instance via ssh and then connecting to a repl within the server process. We would like to allow additional administrators to handle verifications, but would prefer to not give all of those administrators ssh access to the instance. It would also be nice to not require an ssh-capable device to perform group verifications.

So, it would be helpful to have an admin-ui within the clojars web app that allows admins to perform at least group verification tasks, with other admin tasks added in the future.

Implementation notes

We could add a column to the users table to mark a user as an admin. We already use admin in the code to mean someone with the admin-level role for a group, so may want to call this column something else to differentiate; maybe superuser? This would happen in clojars.db.migrate.

The two tasks would be:

The app currently is mostly just html, with traditional form POSTs a tiny amount of js. I think it would be good to keep it that way for maintainability unless there is a compelling reason to make it more complicated.

tobias commented 1 year ago

Hi @kamilwaheed! I added my thoughts here. Happy to answer any questions/help out however I can. Thanks!

danielcompton commented 1 year ago

We already use admin in the code to mean someone with the admin-level role for a group, so may want to call this column something else to differentiate; maybe superuser?

What about webmaster?

tobias commented 1 year ago

Closing this in favor of #853.