t3hk0d3/PermissionsEx — Issue #168: Feature Request: World Groups
Author: Nintendud
Created: 2011-12-29 22:10:24+00:00
State: open

I have a feeling this will get denied, but hear me out!

In my opinion, world inheritance is a clunky way to implement a shared set of permissions among worlds. For example, say I'm a noob who is making a simple server with three maps: default, default_nether, and default_the_end. These should have the same permission nodes. (Ignore the fact that I can just put permissions for all worlds in the main 'Permissions:' section; I'm a noob, remember?)

Since I'm a noob, I have no idea what I am doing, but I know that the nether and the_end worlds should be the same as the normal world.

So I confusedly make the following config file:

```
groups:
default:
default: true
permissions:
worlds:
default:
permissions:
- foo.bar
default_nether:
permissions:
- baz.bat
worlds:
default_nether:
inheritance:
- default
default_the_end:
inheritance:
- default
```

Then I test it out, and am confused by I don't have baz.bat when in the default world. As a noob, I think, "Shouldn't permissions applied to one world apply to them all?" Etc etc.

I know that inheritance is a part of user groups, but it makes more sense there. With user groups, most servers have a hierarchy, where each step up the hierarchy has more permissions than the last. You can also effectively make user group groups by making a new user group that inherits from a set of user groups. With worlds, you typically have a base set of permissions (which you implement for all worlds under the regular permissions: section), and then custom permissions for each world (which may have their own nether/the_end world, which I would assume need the same permissions). To 'group' these together, you have to specify that the nether and the the_end worlds inherit from the regular world, and assign all of the permissions for the world to the main world.

While this works, I feel like the metaphor no longer applies cohesively. It prevents you from assigning permissions to the main world that you may not want in the others (e.g. settings for a weather plugin should not apply to the nether) without having explicit permission settings to remove those permission nodes in the inherited worlds.

A better solution, in my mind, is to make world groups that you can assign permissions to. E.g.:

```
groups:
default:
default: true
permissions:
worlds:
default_group:
permissions:
- foo.bar
- baz.bat
world:
groups:
default_group:
- default
- default_nether
- default_the_end
```

This way, you can assign permissions to all of the worlds in the group, AND permissions to individual worlds in the group without worrying about them carrying over to other worlds in the group via inheritance.

One small issue that I realize: The 'worlds' section in the config file will then become a misnomer, since you can put worlds and world groups there.

What do you think?