Cuberite Forum

Full Version: [DONE] Groups and permissions refactor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
So, how do we want to do the default rank? A special setting that says which of the ranks is the default? What if the rank is removed? Renamed?
I think a special setting would work fine. If no rank has it then it should check how many ranks there, and if there is only one rank it chooses that as the default. If there are more ranks then it gives an error. How's that?
This whole thing is done now, uff, what a huge piece of changes.

Of course anyone's free to make changes, I have only made the webadmin the minimal version of what needs to be done, there will for sure be enhancements.
In bukkit it was possible to make the permissions dynamic. For example in WorldEdit you could add worldedit.limitblocks.1000 (or something like that) to a rank, and he would be able to only change 1000 blocks at once. Would it be possible to do something similar?
I guess it could be emulated, with cPlayer:GetPermissions() and then checking all the returned permissions for a match. It might be a bit slower, but I guess not much. If it is considerably slow, we could add an optional parameter to GetPermissions() to indicate the wanted prefix; only permissions with that prefix would be returned.
Or we could load it only when the plugin is loaded. We could possibly add a hook for when the permissions change.
For school I wanted to implement a permission system into my website and decided I'd port Cuberite's over to my website. I noticed that "account.layout.*" didn't match with "account.layout". This can be changed by changing this to
if (lenP <= lenT)

Do we want this in Cuberite as well?
I have kept them separate on purpose, but I can't remember the reason anymore. I'm still inclined to keep it as-is.
Pages: 1 2 3 4 5 6