-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add constrain to check if plugin can be published. #13696
base: 5.x
Are you sure you want to change the base?
Conversation
…need to do some verification before publishing plugin
…the form validation fails so that it will not publish plugin with errors. If already in publish state do not unpublish as it may cause other things to fail
…o that it will not cause issue
Co-authored-by: Miroslav Fedeleš <[email protected]>
…skar/mautic into add_plugin_can_publish
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 5.x #13696 +/- ##
============================================
+ Coverage 61.62% 61.64% +0.01%
- Complexity 34145 34169 +24
============================================
Files 2245 2249 +4
Lines 102077 102134 +57
============================================
+ Hits 62909 62963 +54
- Misses 39168 39171 +3
|
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 Rohit! I found a few places that could improve. Please go through the suggestions and apply them if they make sense.
app/bundles/PluginBundle/Tests/DependencyInjection/Compiler/TestPass.php
Outdated
Show resolved
Hide resolved
app/bundles/PluginBundle/Tests/Form/Constraint/CanPublishValidatorTest.php
Show resolved
Hide resolved
app/bundles/PluginBundle/Tests/Form/Constraint/CanPublishValidatorTest.php
Outdated
Show resolved
Hide resolved
Co-authored-by: John Linhart <[email protected]>
…atorTest.php Co-authored-by: John Linhart <[email protected]>
Co-authored-by: John Linhart <[email protected]>
Co-authored-by: John Linhart <[email protected]>
…skar/mautic into add_plugin_can_publish
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.
Thank you, Rohit! I see no problems in the code changes 👍
Since this cannot be directly tested without a proprietary plugin, can someone do a second code review? Perhaps @kuzmany ? |
Description:
When authorizing the plugin, if my user doesn't have particular access, I should receive an error and fail to authorize the plugin. This i new constrain which we need to add in any plugin which will not allow user to publish the plugin if user don't have sufficient access.
Also clear the access and refresh token whenever credentials are changed.
Example usage in a plugin:
Steps to test this PR: