PermissionsEx

PermissionsEx

14M Downloads

Trying to understand the database (More of a question)

OxyMethylene opened this issue ยท 1 comments

commented

Hey

Just to explain why I'm trying to understand it:

We are using enjin to automaticly assign a group to a player when he joins the website and links his character. This works like... 80% of the time but ye..

Now, we recently changed pex from yaml file to mysql database, which works perfectly. But this also gave us the option to control pex from a php website. We already have a php website connected to our ingame ticket system. Since we get a lot of tickets when players didn't receive their new rank for joining the website, we have to add it manually. This takes a lot of time.
Controlling groups over the website would allow us to add a button to instantly add a group to the player, saving us a lot of time.

So I was figuring out how the pex database exactly works and noticed that when you remove/add a group from a player, it deletes all records from that player and then adds them all back?

Is there a specific reason why it's doing is. Only reason I can see, is to keep all records from a single player together. Or am I missing something?

As you can see here: http://prntscr.com/ahfdu4
I removed the uuid's.. I don't like putting other people's names here :p I tested with a player of us.

Greetings, looking forward to an answer.
Insane :)

commented

This is done to maintain ordering in permissions and inheritance -- since the order permissions and inheritance are listed determines priority, and it has to be possible to change ordering around. I think PEX does reverse ordering -- the queries used are at https://github.com/PEXPlugins/PermissionsEx/blob/1.23.x/src/main/resources/sql/default/queries.properties#L9