[Feature] Separating Permissions from users ranks
TomLewis opened this issue ยท 6 comments
I am looking into an alternative to GroupManager, and so far have found nothing to even compare to it when it comes to configuration files.
Putting both Permissions and Users data in one files makes next to no sense at all, can these please be separated, or at the very least, have a toggle option to keep these two files separate.
I will tell you why having one file for everything is a terrible idea.
Disadvantages of one File users/permissions.
- If you have tens of thousands of users that are changing ranks regularly, you cannot make changes to the permissions when the server is running, this is terrible design.
- To make any changes, you have to download the entire file first, before you can make changes! If the permissions is a separate file, you can just edit what you have locally and upload.
- As you have to download the 1 file each time, you have to edit it fast, re-upload and then hope nobody changed ranks, and hope nobody donated, and hope nobodies donation ran out in this time, this would not be an issue if the permissions and user data was separate.
- Source control cannot happen, For someone that uses Git this is a no brainer, you cant keep backups, revisions and edits of your permissions locally, or version controlled if you plonk your users in this file too!
- Backups, you cant just keep one backup if your working permissions, and then a backup of users data, we are being forced to have everything mashed into one file!? Sometimes its needed to just compare users ranks to see if an issue has occurred, having these smashed in with permissions means you cant just look at old user file backups, you have everything stuck together.
- Flexibility, if users are separate it means you can how-swap the permissions when you need, or move users between servers, you cannot do this if everything is in one file.
- Its an absolute mess; when you have tens of thousands of users to keep track of, having one file with everything is just a terrible mess, for manual editing permissions in general, just having a permissions file is daunting enough, having 70k players in this file too!? madness.
- Corruption, Reading writing to a very large text file will increase the chances of something going wrong, putting everything in one basket will end badly at some point.
Advantages of one File users/permissions.
- Servers with 10-20 players could maybe benefit from having one file, where everything is in one place.
How do we fix this?
playerdata.yml
permissions.yml
That simple.
@Stormbow Is there a timeline for PEX 2.x? Anywhere I can follow updates?
I can tell you that this definitely won't happen for PEX 1.x but Zml2008 may consider if for PEX 2.x if he hasn't already done this.
Unfortunately, I don't know that information. @zml2008 would be the one who'd know.
In theory this is already supported in 1.x in a rudimentary manner with the MultiBackend implementation -- different backends can be used for users and groups, but this feature is not documented in 1.x because of rough edges and is only planned to be supported in 2.x. If the feature is important to you, the source is at https://github.com/PEXPlugins/PermissionsEx/blob/1.23.x/src/main/java/ru/tehkode/permissions/backends/MultiBackend.java#L30 to look into. There's a 2.0 targeted issue to reimplement this feature in a more flexible manner.
@zml2008 I will look at the code to see if I can figure out how to implement it in V1, if its unstable Ill make do until V2 rolls around, this is quite an important structure to have a solid production environment.
I will be very grateful for this implementation in V2. Thank you.
Any news about that @FrozenBeard ?