-
Notifications
You must be signed in to change notification settings - Fork 119
Guibescos/transition to permissions #297
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
Conversation
f0fc2b9 to
ead116a
Compare
jayantk
left a comment
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.
LGTM, couple minor comments but feel free to merge and address in follow-ups.
| next_mapping_account.clone(), | ||
| permissions_account.clone() | ||
| ], | ||
| bytes_of::<CommandHeader>(&AddMapping.into()) |
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.
is this supposed to be InitMapping ?
| ) | ||
| .unwrap(); | ||
|
|
||
| assert_eq!( |
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'm confused about the tests below. I thought that funding_account is permissioned to do these actions, and the attacker_account isn't. It looks like every test below is a permission violation
Maybe leave some code comments explaining what the tests are supposed to be testing.
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.
oh I looked into the code and realized that only InitMapping is allowed to be done by the permissions key. suggest leaving a comment to that effect and that these tests will change as more permissions are granted.
Update all instructions that require account signatures to having the
PermissionAccountchecks.It is backwards compatible and this PR doesn't try to define the permissions.