-
Notifications
You must be signed in to change notification settings - Fork 75
Conversation
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.
For my comment on the permissions test, I'm thinking we apply that to all of the permissions tests (move them to the respective object file which is being modified!)
src/models/teams.rs
Outdated
pub struct OrganizationPermissions: u64 { | ||
const EDIT_DETAILS = 1 << 0; | ||
const EDIT_BODY = 1 << 1; | ||
const UNUSED = 1 << 1; // a currently unused permission, formerly EDIT_BODY |
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.
since this is unused why not just remove the flag?
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.
was trying to avod breakage in staging- but probably doesnt matter
pub struct DummyData { | ||
// Alpha project: |
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 think it would be better for this to use nested structs instead of one top-level one
src/models/teams.rs
Outdated
if member.accepted { | ||
return Some(member.permissions); | ||
} | ||
return Some(member.permissions); |
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.
As written, this change has no effect on the behavior of the code - it just always returns Some(member.permissions)
. Did you maybe intend to only return that when the member has accepted?
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.
Whoops- this is an artifact from that test I commented out.
Looking forward to using the new templated test DB! |
* permissions tests * finished permissions; organization tests * clippy, fmt * post-merge fixes * teams changes * refactored to use new api * fmt, clippy * sqlx prepare * revs * revs * re-tested * re-added name * reverted to matrix
Fixes MOD-556