-
Notifications
You must be signed in to change notification settings - Fork 75
Extend MinimalPermissionsGuidancePlugin with scopes to ignore #1365
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
base: main
Are you sure you want to change the base?
Extend MinimalPermissionsGuidancePlugin with scopes to ignore #1365
Conversation
…nitializeApiSpecsFolderPath
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.
Thanks for the PR. Let's do some changes before we proceed. Since quite a few things changed, I'll have a more thorough look at it in the week of Aug 25. For the future, let's keep PRs focused on the issue at hand and avoid unrelated refactorings. If you see room for improvement, please raise an issue so that we can discuss it first 🙂
@@ -8,6 +8,14 @@ | |||
}, | |||
"apiSpecsFolderPath": { | |||
"type": "string" | |||
}, | |||
"permissionsToExclude": { |
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 we're just adding this property, we can't update previous versions schemas because the property isn't available there. Let's only add it to the latest version
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.
fixed
DevProxy.Plugins/Utils/GraphUtils.cs
Outdated
@@ -96,4 +101,57 @@ internal async Task<IEnumerable<string>> UpdateUserScopesAsync(IEnumerable<strin | |||
|
|||
return newMinimalScopes; | |||
} | |||
|
|||
public static MethodAndUrl GetMethodAndUrl(string methodAndUrlString) |
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.
This method doesn't need to be public. Let's make it internal instead
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.
fixed
DevProxy.Plugins/Utils/GraphUtils.cs
Outdated
return new(Method: info[0], Url: info[1]); | ||
} | ||
|
||
public static string GetTokenizedUrl(string absoluteUrl) |
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.
This method doesn't need to be public. Let's make it internal instead
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.
fixed
DevProxy.Plugins/Utils/GraphUtils.cs
Outdated
return "/" + string.Concat(new Uri(sanitizedUrl).Segments.Skip(2).Select(Uri.UnescapeDataString)); | ||
} | ||
|
||
public static MethodAndUrl[] GetRequestsFromBatch(string batchBody, string graphVersion, string graphHostName) |
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.
This method doesn't need to be public. Let's make it internal instead
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.
fixed
DevProxy.Plugins/Utils/GraphUtils.cs
Outdated
@@ -96,4 +101,57 @@ internal async Task<IEnumerable<string>> UpdateUserScopesAsync(IEnumerable<strin | |||
|
|||
return newMinimalScopes; | |||
} | |||
|
|||
public static MethodAndUrl GetMethodAndUrl(string methodAndUrlString) |
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.
This method isn't related to Graph so let's find a better place for it
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.
Moved to MethodAndUrlUtils.
(the method is consumed by graph plugings)
At the beginning it seemed like we needed those changes for Graph-related classes. |
#1052