File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/main/java/com/cloudbees/plugins/credentials Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -241,13 +241,12 @@ public boolean isVisible() {
241241 }
242242
243243 /**
244- * Administrator's view credentials from 'Manage Jenkins', except when it's a folder .
244+ * Administrator's view credentials from 'Manage Jenkins'.
245245 * @param accessControlled an access controlled object.
246246 * @return whether the action should be visible or not if the user is an administrator.
247247 */
248248 private boolean isVisibleForAdministrator (AccessControlled accessControlled ) {
249- return accessControlled .hasPermission (Jenkins .ADMINISTER ) &&
250- !accessControlled .getClass ().getName ().equals ("com.cloudbees.hudson.plugins.folder.Folder" );
249+ return accessControlled instanceof Jenkins && accessControlled .hasPermission (Jenkins .ADMINISTER );
251250 }
252251
253252 /**
You can’t perform that action at this time.
0 commit comments