Skip to content
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

Closed
rcjrrjcr opened this issue Jun 29, 2011 · 1 comment
Closed

Comments

@rcjrrjcr
Copy link

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>)), where has <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.

@Acrobot
Copy link
Collaborator

Acrobot commented Jul 1, 2011

Fixed in commit e522b33.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants