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

Add an admin to the Whitelister Role #1586

Closed

Conversation

levino
Copy link

@levino levino commented Jan 4, 2019

Fix #1585: Make whitelister role ownable and give the owner power to remove all other whitelisters.

It is debatable whether or not this should be added to official codebase. I would also be very happy to get a review on this specifically considering security implications.

@levino levino force-pushed the feature/improve-whitelist branch 2 times, most recently from a02d935 to 5eeed3e Compare January 4, 2019 09:22
@levino levino changed the base branch from master to release-v2.1.0 January 4, 2019 09:22
@levino levino force-pushed the feature/improve-whitelist branch from 5eeed3e to 2363436 Compare January 4, 2019 09:25
@levino levino changed the base branch from release-v2.1.0 to master January 4, 2019 09:25
@nventuro nventuro closed this Jan 14, 2019
@levino
Copy link
Author

levino commented Jan 14, 2019

I understand why you closed this. A quick feedback on whether or not this code is possibly problematic for the security of the SC would have been much appreciated though.

@nventuro
Copy link
Contributor

At a glance, I don't see any security issues, though the implementation is incomplete: you should also remove entries from bearers on _remove calls, and you may want to perform some extra checks via require.

Additionally, since you're iterating over an array, removeAll may end up being too expensive to call in a single block: adding some sort of 'pagination' would help in this regard.

@levino
Copy link
Author

levino commented Jan 15, 2019

Cool, thanks. Removing a bearer twice or thrice is not a problem, that is why I did not reset the bearers array. But the point with the loop is valid. Do you have an example for this pagination? It is not possible to just overwrite the whole array with an empty one, right? Thank you for your review!

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

Successfully merging this pull request may close these issues.

2 participants