LuckPerms

LuckPerms

905k Downloads

Players with luckperms.autoop can use all luckperms commands even though commands-allow-op is false

MCMDEV opened this issue ยท 1 comments

commented

Description

If the commands-allow-op config value in LuckPerms is set to false AND the config value auto-op is true AND a player has the permission luckperms.autoop, they can use all LuckPerms commands.

Reproduction Steps

Change the following values according to this in the config.yml

apply-bukkit-default-permissions: false
apply-bukkit-child-permissions: false
enable-ops: false
auto-op: true
commands-allow-op: false

Expected Behaviour

A player with just the luckperms.autoop permission should not be able to use any LuckPerms commands

Server Details

git-Paper-392 (MC: 1.20.4)

LuckPerms Version

v5.4.130

Logs and Configs

No response

Extra Details

This might be expected behavior, but if so I believe it really shouldn't be.

commented

I've taken a look at the source code and figured that the reason this doesn't work is actually because if apply-bukkit-default-permissions is false, the commands-allow-op option is ignored as it is implemented using default permissions.

Some possible solutions are:

  • Implement an edge case into the OP-Processor that denies LuckPerms permission if commands-allow-op is false
  • Implement an edge case into the LuckPermsPermissible class
  • Update the config and tell users that default permissions are required for commands-allow-op as false to work.

I'm happy to create a PR for either, I'd just like a maintainer to make a decision so I don't waste the effort.