Droxperms, Ontime addgroup problem.
javieraizpuru opened this issue ยท 1 comments
When using Droxperms and Ontime "addgroup reward" the group is added as a subgroup and not as the maingroup. I talk to the Ontime and he answer with this.
Edge209
3 hours, 26 minutes ago
Ok, here's the deal.
Droxperms and the Vault interface have been implemented differently that most (all?) other permissions plugins with respect to groups and sub-groups.
For Droxperms, the "addgroup" and "removegroup" Vault functions call DroxPerm's API for "add SUB group" and "remove SUB group". When OnTime does a promotion it first tries to remove a player from their current primary group. This fails with DroxPerms because it tries to remove a "sub group" per the called API function, but there is no "sub group". OnTime then tries to "add" in the new (promoted) group, and again because of the API function called it is added as a SubGroup.
In the other permissions plugins if the group specified for removal is the primary group, the player will be removed. Then since the player is now has no assigned primary group, when OnTime does the "add group", this becomes the new primary group.
If OnTime is doing an "addgroup" reward, since the player already has some primary group, the "addgroup" rewards results in the addition of a sub-group. This will also work with DroxPerms, per the current Vault interface.
So in a nut shell, OnTime cannot do a promotion with DroxPerms unless the Vault interface (and likely the DroxPerms API) is modified. Since there is no Vault/DroxPerms interface available to modify the primary group, I can't even add in special handling for DroxPerms to try to handle it from my side.
Now I could directly interface with the DroxPerms API, since it does have a call to modify the primary group, but by my own policy, I will only support permissions plugins via Vault. I don't want to have to deal with the hassle of keeping up with every possible API for different permission plugins. That is the mission of Vault, which they execute very well.
Regards, Edge
ps Feel free to re-post my investigation results with the DroxPerms/Vault dev teams if you would like to see them take action. I'd be glad to answer any questions they may have regarding OnTime's methods.
Can you fix it? Thanks.