LuckPerms

LuckPerms

41.4k Downloads

Dynmap permissions lookup fail?

Dockter opened this issue ยท 6 comments

commented

Hello, using LP within Sponge EcoSystem, latest builds.

When I attempt to do /dynmap pause, I am tripping this internal check with Dynmap. Verbose of permissions doesn't indicate any issues. Thoughts?

https://github.com/webbukkit/DynmapCore/blob/master/src/main/java/org/dynmap/DynmapCore.java#L1566

commented

What version MC/Forge?

commented

Forge 1.12.2, build 2501. 2.6 version of Dynmap. I am using a developer build of SpongeForge, on the 9/30/2017 commit.

commented

I think this may be fixed by:

SpongePowered/SpongeForge#1660

which implements Forge's IPermissionHandler, which is what Dynmap is using.:

https://github.com/webbukkit/DynmapForge/blob/master/src/main/java/org/dynmap/forge/DynmapPlugin.java#L358

Otherwise, it falls back to the custom Dynmap PermissionProvider class, which, by the looks of it, doesn't route through the Forge permissions system.

https://github.com/webbukkit/DynmapForge/blob/master/src/main/java/org/dynmap/forge/permissions/OpPermissions.java#L36

... and rather just checks if the player is OP.

Either way, this looks to be more of an issue with Dynmap / Sponge than LP. :)

commented

Luck,

Dynmap isn't using Forge's permissions system at all. Its using a fallback internal permissions handler within itself. That PR won't help this issue.

commented

Ah my bad, it just uses the same name. :P

Forge also has a PermissionHandler class, I assumed it was the same thing.

It seems dynmap's permission handler class is used for hooking with specific permission plugins on Bukkit, so when running under Sponge, it'll always return null.

https://github.com/webbukkit/DynmapCoreAPI/blob/master/src/main/java/org/dynmap/permissions/PermissionsHandler.java

https://github.com/search?q=org%3Awebbukkit+org.dynmap.permissions.PermissionsHandler&type=Code

So, as this is null, it just falls back to it's own handling system here:

https://github.com/webbukkit/DynmapForge/blob/master/src/main/java/org/dynmap/forge/DynmapPlugin.java#L362

Which uses the PermissionProvider instance in the DynmapPlugin class:

https://github.com/webbukkit/DynmapForge/blob/master/src/main/java/org/dynmap/forge/DynmapPlugin.java#L101

which is implemented via FilePermissions or OpPermissions here:

https://github.com/webbukkit/DynmapForge/tree/master/src/main/java/org/dynmap/forge/permissions

Neither of which run any checks through Sponge or Forge.

soo, this is a Dynmap issue, and nothing else. It would seem most logical to just run the checks through the Forge API.

I suggest you open a ticket on the Dynmap repo, there's not much more I can do to help, since the checks aren't being run properly via Forge. :P

commented

Doesn't Dynmap use own permissions system on Forge?