Core icon indicating copy to clipboard operation
Core copied to clipboard

Add console commands to manipulate ranks / groups / permissions

Open madmaxoft opened this issue 10 years ago • 6 comments

We should have a full set of commands to manipulate ranks, groups and permissions so that people don't need to use webadmin to edit ranks. Proposed commands: addrank <rankname> delrank <rankname> [<replacementrankname>] renamerank <oldname> <newname> addgroup <groupname> delgroup <groupname> renamegroup <oldname> <newname> addpermission <groupname> <permission> delpermission <groupname> <permission> addrankgroup <rankname> <groupname> delrankgroup <rankname> <groupname> listranks listgroups <rankname> listpermissions <groupname> listrankpermissions <rankname>

Marking as easy since most of these map directly to API calls, so the command handlers should be pretty easy to write. Best place for the handlers would be the ranks.lua file; don't forget to use the Info.lua file to register and document them.

madmaxoft avatar Sep 25 '14 20:09 madmaxoft

I'll try to do that. EDIT: Didn't remember now ranks and groups are managed with SQLite. Sorry :(

bennasar99 avatar Dec 29 '14 18:12 bennasar99

They are in SQLite, but the API provides a full set of commands to work with them, so it should be a simple task of mapping the console commands to API calls. Have a look at how the webadmin management does it.

madmaxoft avatar Dec 29 '14 20:12 madmaxoft

Now I see, I may try later.

bennasar99 avatar Dec 30 '14 11:12 bennasar99

Why not create one permission command instead of many commands?

Example: /perms group AllPerms create /perms group AllPerms add * /perms rank Admin create /perms rank Admin addgroup AllPerms /perms rank Admin prefix "&b" /perms user Howaner setgroup Admin

Howaner avatar Mar 24 '15 05:03 Howaner

I'm not against a single command, but I strongly suggest having simple separate commands as well, because almost anyone using the server will need to use those and we want to keep it as simple as possible for the regular people. No-one wants to read a big hunk of text in order to be able to play on a home server.

madmaxoft avatar Mar 24 '15 12:03 madmaxoft

I think one command with the same usage format as PermissionsEx (The most used bukkit permission plugin) is much clearer and simpler than 20+ commands.

Howaner avatar Mar 24 '15 12:03 Howaner