-
Notifications
You must be signed in to change notification settings - Fork 6
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
Jira Software parsing and permission resolvers with unit tests #60
Jira Software parsing and permission resolvers with unit tests #60
Conversation
311d709
to
e2fc593
Compare
let request_type = RequestType::Get; | ||
let result = check_url_for_permissions(&permission_map, ®ex_map, request_type, url); | ||
|
||
println!("Permission Map: {:?}", permission_map); |
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.
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.
Yeah, this should be removed.
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.
Gotcha, do we also want to remove debug text from the other existing test cases as well?
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.
Yeah, I think that'd be good. I see there is some from my code too 😬 😓
e2fc593
to
d52f69e
Compare
|
||
if scopes.is_empty() { | ||
// For Jira Software if the initial scopes are empty, try the scopes from the security field | ||
scopes.extend( |
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.
Are there any cases where the security
field has additional scopes with a nonempty permission
field?
if intrinsic_func_type == IntrinsicName::RequestJiraSoftware { | ||
let permissions = check_url_for_permissions( | ||
interp.jira_software_permission_resolver, | ||
interp.jira_software_regex_map, |
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 a match statement for intrinsic_func_type
would be more idiomatic here. I realize this was originally my code, sorry 😓.
Also, maybe we have the second argument be set to get if it does not exists. That eliminates the need for the first if else block.
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.
These may be out of scope for this PR, and I can make the changes since this was originally my bad code.
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.
… resolver with unit tests and refactor products to use match statement
d52f69e
to
0ce2619
Compare
As Jira Software swagger doc format isn't the same format as others like Bitbucket, JSM, etc.