Posts: 4,628
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 494 thank(s) in 423 post(s)
Just to be clear, the current webadmin does exactly what you requested here. Every plugin has it's own space with the tabs (For instance gallery.xoft.cs:<port>/webadmin/Core/Chat), so the question pretty much is: Do we want the webadmin integrated in Cuberite or should we move it inside a plugin.
I'm personally inclined to keep it integrated, but I would like to see some changes. For example, I'd like to be able to limit a webadmin user to specific tabs and for plugins to be able to change the return HTTP status code and returned headers. lastly I'd like to be able to hide webtabs from admins as they most likely do not want to see tabs that provide an API. We could possibly add a new method cWebAdmin:AddAPI which would do that. We could even change the API requests to something like "gallery.xoft.cs:<port>/webapi/Core/Chat"
Posts: 31
Threads: 2
Joined: Nov 2016
Thanks: 11
Given 7 thank(s) in 6 post(s)
Plugins currently live under the webadmin namespace, and require authentication to be accessed.
Even if we had the ability to have multiple permission groups under web admin, that would still make plugins live under /webadmin namespace, as if they were second class citizens. Also I don't think hosting a public map under /webadmin/dynmap makes sense at all. Guests aren't administrators, they shouldn't be able to reach things labeled as such.
Maybe renaming the current webadmin api to just web api, dropping the /webadmin namespace and add admin features as a plugin (which would be accessible at /webadmin) alongside a revamped permission/login system would tick all the boxes?
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
The first problem you ever run into when designing a system with both public and private faces is, how do you manage accounts? Webadmin was designed as a simple way for the admins to manage the server, it is simple - the main server admin defines the accounts in the webadmin.ini file. But if there are to be accounts and permissions and what not, who then creates the accounts? Who assigns all the permissions? Does Cuberite store the logins? Or do we use a third party for logging in?
I wouldn't remove the current system, it work okay for what it was meant. We could simply add another system outside of the "/webadmin" namespace, with any rules we think of. That way, we can simply phase webadmin out slowly, after all the plugins are migrated to the new system.
I definitely don't like webadmin-as-separate-plugin. Too much setup and maintenance cost, with nearly zero advantages.
Posts: 108
Threads: 1
Joined: Aug 2016
Thanks: 22
Given 15 thank(s) in 11 post(s)
11-28-2016, 05:56 AM
(This post was last modified: 11-28-2016, 05:58 AM by ShadowCone.)
I don't see why we should abolish the webadmin, but I would like to see an interface for plugins to publish sites that are publicly available without authentication (and an interface for dynamic pages made by a lua callback function)
For example, I want to build a matrix cuberite chat bridge but matrix works over http so I need to run my own webserver to communicate with the matrix server whereas I would need basically a lua function exposed via http (as an api)
Posts: 108
Threads: 1
Joined: Aug 2016
Thanks: 22
Given 15 thank(s) in 11 post(s)
Mostly do agree.
Offtopic: the core team doesn't develop in forks, but they use the original repo and create branches. There are some branches that were abandoned, there are some that are actively developed and there are some that are somehow struck and isn't used so much....
Posts: 681
Threads: 26
Joined: May 2014
Thanks: 112
Given 48 thank(s) in 37 post(s)
I think a cWebServer singelton object that plugins can use to mount their own http data handler would be a very good idea. Although we would have to implement some interface to make plugins have their own plugins. The webadmin currently has a lot of plugins that register panels on it