-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Users are able to build ChestShops without the necessary permissions #1
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is caused by the condition at https://github.com/Acrobot/ChestShop-3/blob/master/com/Acrobot/ChestShop/Listeners/signChange.java#L56 . You're checking for
(!isPlayerAdmin && !(has ChestShop.shop.create || has ChestShop.shop.create.<id> || has ChestShop.shop.exclude.<id>))
, wherehas <node>
represents checking the user for the specified permission node. This allows players without the exclusion nodes to create chest shops, even without the creation nodes.An example of a better condition would be
( !(isPlayerAdmin || (has ChestShop.shop.create && !(has ChestShop.shop.exclude.<id>)) || (has ChestShop.shop.create.<id>)) )
, which examines restriction nodes only when the ChestShop.shop.create permission is encountered, not any of the ChestShop.shop.create. nodes.The text was updated successfully, but these errors were encountered: