lishid / OpenInv

Open anyone's inventory as a chest, real-time!
GNU General Public License v3.0
120 stars 97 forks source link

OP user ignores permission nodes #85

Closed k0nker closed 6 years ago

k0nker commented 6 years ago

I have created a permission group that removes things from OP, it works since plugins just search for the permission to give access to a command. However, this plugin is the only one that is ignoring the removal of a node, specifically openinv.override.

Essentials, CorePortect, WorldGuard, WorldEdit, etc, all listen to the perm group that gives their perms a false flag and denies the ability to use their commands to those with OP, but OpenInv is letting anyone with OP override the .exempt node on players.

As for why I did this, I wanted to give my staff members the ability to utilize command blocks, but nothing extra that op gives (like *.* permissions). Is there a chance you can add in the ability to not default the permissions to OP users? Or if there's an ISOP() boolean in the permission check, maybe have a way to turn it off in the config?

RoboMWM commented 6 years ago

Set negation nodes if you don't want your ops to actually be ops...

k0nker commented 6 years ago

@RoboMWM I already did that. The problem I am having is that OpenInv doesn't recognize that the permission openinv.override is set to false when the user is OP'd. Not only that node, but everything under openinv turns on when OP'd, even if the nodes are each set to false.

Jikoo commented 6 years ago

Guess we'll have to actually check what each PermissionAttachment sets values to rather than using a basic permissions check.

As a bandaid, you can negate OpenInv.*

k0nker commented 6 years ago

I already attempted to just negate openinv.* in the permissions and it also did not work.

To be clear, I have attempted to set each individual permission node as well as the wildcard, and any variation I could think of, to false. None of it accomplished the goal.

Jikoo commented 6 years ago

Oops, you'll also need to negate *. I really hate wildcards.

Jikoo commented 6 years ago

Please try OpenInv.zip

Jikoo commented 6 years ago

3.3.4 contains this fix. I'm assuming it works as intended due to the lack of response.