Tweaks based on review comments

This commit is contained in:
tfennelly committed 2015-10-06 09:44:11 +01:00
1 parent 955eb7274a
commit a8e83c3c2d
3 files changed
+9 -7

No files matched your search

+4 -2
View File
@@ -685,11 +685,13 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
@RequirePOST
public HttpResponse doDoUninstall() throws IOException {
Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
Jenkins jenkins = Jenkins.getActiveInstance();
jenkins.checkPermission(Jenkins.ADMINISTER);
archive.delete();
// Redo who depends on who.
Jenkins.getActiveInstance().getPluginManager().resolveDependantPlugins();
jenkins.getPluginManager().resolveDependantPlugins();
return HttpResponses.redirectViaContextPath("/pluginManager/installed"); // send back to plugin manager
}