mattermost-plugin-gitlab
mattermost-plugin-gitlab copied to clipboard
Fixes Issue MM-257, invalid scopes during /gitlab connect
This PR fixes the bug bug in https://github.com/mattermost/mattermost-plugin-gitlab/issues/257
The problem with the error The requested scope is invalid, unknown, or malformed is caused by more scopes being selected in the Mattermost plugin gitlab than in the gitlab.
the changed code is in the 'server/plugin.go' file. Precisely changing scopes which were originally "api" & "read_user" to empty array string. Then when /gitlab connect is tried it shows connected successfully.
When selecting a scope other than "api", for example choosing "profile" only without 'API'. The gitlab server sends the error The requested scope is invalid, unknown, or malformed. The above situation can be concluded that the gitlab server will send the same error if it does not check 'api'.
Hello @maisnamrajusingh,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.
Codecov Report
Merging #292 (011c548) into master (bbd7d38) will not change coverage. The diff coverage is
0.00%.
@@ Coverage Diff @@
## master #292 +/- ##
=======================================
Coverage 39.36% 39.36%
=======================================
Files 16 16
Lines 1801 1801
=======================================
Hits 709 709
Misses 1015 1015
Partials 77 77
| Impacted Files | Coverage Δ | |
|---|---|---|
| server/plugin.go | 11.61% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update bbd7d38...011c548. Read the comment docs.
@maisnamrajusingh Heads up that you need to merge master
This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!
I'm not convinced that this PR takes the right direction. https://github.com/mattermost/mattermost-plugin-gitlab/issues/257 is caused by an invalid user input, not by a code issue. It can't work properly if the OAuth app is not granted the right scopes. With the changes in this PR, issues will arise at another level.
This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!
Closing per https://github.com/mattermost/mattermost-plugin-gitlab/pull/292#issuecomment-1440810847