Page 1 of 1

Irrevokable singleplayer privileges

PostPosted: Fri Aug 05, 2016 06:59
by Wuzzy
You ever noticed that in singleplayer you have an astonishing amount of privileges, but not only that, they're even irrevokable. Why is that so?
Why is singleplayer so special in that you can't revoke certain privileges?
All this does is confusing mods but I see no positive effect of having irrevokable privileges.

Players who are smart enought to say “/grant” or “/revoke” probably know what they're doing anyway, so this isn't really a “protection” feature either.

So what's the point of irrevokable privileges in Minetest and why do they exist?

I can maybe understand why stuff like server is irrevokable (technical reasons, I guess) but I totally don't understand why interact, teleport, give, and the like are irrevokable.

Re: Irrevokable singleplayer privileges

PostPosted: Fri Aug 05, 2016 17:08
by Byakuren
Some rights are so fundamental that no state action can be considered "due process" when removing them. It would be unconstitutional.

Re: Irrevokable singleplayer privileges

PostPosted: Fri Aug 05, 2016 21:01
by est31
Well probably it was done to prevent people from shooting themselves into the foot. You know, they typed something funny, and now their singleplayer world is "broken".

Re: Irrevokable singleplayer privileges

PostPosted: Fri Aug 05, 2016 21:02
by rubenwardy
It seems that there is no distinction between privileges given by default, and privileges you can never revoke

Re: Irrevokable singleplayer privileges

PostPosted: Fri Aug 05, 2016 21:44
by MineYoshi
I wanted to revoke "server" priv to test a command...

But since that is "Irrevokable" what i can do?

Re: Irrevokable singleplayer privileges

PostPosted: Fri Aug 05, 2016 22:03
by rubenwardy
Start the game using the server tab, and then connect using another instance of the client. You can do that on the same computer. Use "127.0.0.1" in the client tab.

Re: Irrevokable singleplayer privileges

PostPosted: Sat Aug 06, 2016 12:34
by Wuzzy
rubenwardy: It works, but this is a shitty workaround. Starting Minetest twice just for this is stupid. And you are forced to start over since as client you don't have access to singleplayer profile. And if you joined under the admin name, you have the irrevokable privileges again.

Well probably it was done to prevent people from shooting themselves into the foot. You know, they typed something funny, and now their singleplayer world is "broken".

Here's a list of privileges I still have after doing “/singleplayer revoke all”:
  • interact
  • shout
  • teleport
  • settime
  • server
  • bring
  • basic_privs
  • password
  • ban
  • home (Minetest Game)
  • rollback
  • kick
  • protection_bypass
  • privs
  • give

IMO the only privilege that you REALLY need in singleplayer is interact and maybe home in Minetest Game, the rest is either for server stuff or, frankly, cheating.

So IMO the “shooting yourself in the foot” argument barely holds, as losing any of the privileges except interact (and maybe home) won't break singleplayer experience. Cheaters probably know how to use /grant.

Keeping the privs privilege seems legit to allow for quick testing.
I am not sure about server. It allows you to use shutdown, clearobjects, save_mod_profile, auth_reload, set, emergeblocks and deleteblocks. Set will come in handy but again that's kinda cheating and cheaters know how to use /grant.

Short rundown:
  • interact: Force since this is the core of singleplayer
  • server: Probably don't force
  • privs: Force for convenience. Maybe.
  • teleport: Don't force, it's cheating
  • settime: Don't force, it's cheating
  • bring: Don't force, it's cheating
  • give: Don't force, it's cheating
  • shout: Don't force, no need in singleplayer
  • basic_privs: Don't force, no need in singleplayer
  • password: Don't force, no need in singleplayer
  • ban: Don't force, no need in singleplayer
  • kick: Don't force, no need in singleplayer
  • protection_bypass: Not sure.
  • rollback: Don't force, it's too technical
  • home (Minetest Game): Probably don't force. It's useful but not essential. Also, I am not happy with forcing subgame-specific privileges

Do you agree with my list?

In general, the list of irrevokable privileges should be kept as small as possible. Not as large as possible.

The real problem with irrevokable privileges is that there are mods which change their behaviour depending on what privileges you have. E.g. if you have the give privilege, the Unified Inventory adds buttons to give you basically any item for free. This makes sense, since this is the equivalent to /giveme so its basically just a nicer interface to it. But this also means, in singleplayer, you always get these buttons. Cheating by default, yay! xD
VanessaE refuses to change this behaviour because she too thinks the real bug here lies in the privilege system, not in her mod. And I agree, Unified Inventory is not as fault here.


After doing some investigation, I figured out this: It seems that Minetest automatically makes all privileges which have give_to_singleplayer set to true (which is the default) also irrevokable. Yes, rubenwardy is right here and I think this behvariou is wrong. Some sort of distinction must be possible.


EDIT:
I just posted an issue suggesting to stop giving some privileges to singleplayer by default. This doesn't solve my problem directly, but it it is a good first step since it especially fixes the problem with “default cheating”.

https://github.com/minetest/minetest/issues/4413

Re: Irrevokable singleplayer privileges

PostPosted: Sat Aug 06, 2016 16:25
by MineYoshi
I agree totally!
+100

Re: Irrevokable singleplayer privileges

PostPosted: Fri Aug 12, 2016 05:11
by Sokomine
Wuzzy wrote:protection_bypass: Not sure.

That's no longer automaticly given. The priv made testing protection mods rather tricky, and mods or maps which rely on protection for gameplay reasons did not work due to the override.

As for the other privs - never can't hurt to have shout even if there's no one listening. Perhaps mobs will listen to what you have to say in future mods? Teleport, settime, bring, ban, and kick could certainly be optional. give could also be annoying if you want to play a survival game. As long as there's the /grant command and sufficient privs to expand the privs singleplayer has when needed, that ought to be fine.