Closed tobias closed 1 year ago
Hi @kamilwaheed! I added my thoughts here. Happy to answer any questions/help out however I can. Thanks!
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?
Closing this in favor of #853.
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 useadmin
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; maybesuperuser
? This would happen inclojars.db.migrate
.The two tasks would be:
clojars.admin/check-and-verify-group!
does, and that could be pulled apart to build this feature.clojars.admin/verify-group!
does, and that could also be pulled apart and used here.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.