-
Notifications
You must be signed in to change notification settings - Fork 71
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
Flatten if structure in checkPermissions
#97
Conversation
I haven’t reviewed all the logic and cases yet. However, it's generally best to avoid modifying sensitive logic just before a code freeze, unless it's necessary to fix a bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any more test coverage needed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the flatten code, easier to read and understand.
We have to make sure we have 100% branch coverage of this function. And the new code shouldn't break it.
@kingster-will already achieved 100% coverage, these changes don't seem to affect coverage We could add extra checks to make sure an upgrade doesn't mistakenly add an additional state that is not UNSET, bypassing the check in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flattening looks good, I think this PR can be merged since it's just shuffling around the branches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General looks good!
Please handle the naming change and merge.
Maintaining the same logic, we can reorder the code to: