LuckPerms

LuckPerms

41.4k Downloads

Issue with perma all permissions

sekwah41 opened this issue ยท 5 comments

commented

The function removeAttachment doesnt seem to function properly (works in other permissions such as PermissionsEx) and the player is stuck with full permissions from the below code at least.

I am currently working on a recode however this code from the old builds should still be valid and I am pretty sure it is also how commandsigns does this too so it is a larger issue possibly.

Example of code that triggers the problem
try { permissionAttachment = player.addAttachment(plugin, "*", true); player.chat("/" + command); } finally { player.removeAttachment(permissionAttachment); }

One of my users was having trouble with this and using LuckPerms as the permission manager

commented

Can confirm that this is happening on the latest development build. The permission stays only attached until the next logout. (so it's not added to the LuckPerms permissions, just looks like the removal is either broken or doesn't like that it happens in the same tick)

I did some testing and it looks like the issue was introduced somewhere between versions 4.1.25 (f969e2e) and 4.1.100 (c4c98aa). Unfortunately I can't find any builds between that to test :/

I kinda suspect 10c0efa being the cause as that's the only one that seems to be touching that part. Gonna try to build the commit before that and test with it.

Update: Well that version was unusable due to the high CPU usage (who would've thought) but b8a1871 seems to work fine and so I suspect that the next one, which changes the caching behaviour (a6facf7), is the cause for this bug or that it at least lies between these two commits. Can't really test that as it's resulting in the high CPU usage and crashing the server :/

commented

Is this an issue specifically with * being removed or any permissions being removed after the permission node has been added?

commented

Seems to be happening with any permission.

commented

The latter, should be fixed now

commented

Looks good, thanks!