Skip to content

Commit b6ec8b6

Browse files
Disable doCheckToken method in TokenCredentials
Comment out the doCheckToken method and its content.
1 parent 4a76c2f commit b6ec8b6

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/main/java/io/jenkins/plugins/vigilnz/credentials/TokenCredentials.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,24 @@ public String getDisplayName() {
5959
return "Vigilnz Security Token";
6060
}
6161

62-
@POST
63-
public FormValidation doCheckToken(@AncestorInPath Item item, @QueryParameter String token) {
62+
// @POST
63+
// public FormValidation doCheckToken(@AncestorInPath Item item, @QueryParameter String token) {
6464
// Security: Check if user has permission to configure this item (project/folder)
6565
// If item is provided, check item permission; otherwise check global admin permission
66-
if (item != null) {
67-
if (!item.hasPermission(Item.CONFIGURE)) {
68-
return FormValidation.error("No permission to configure this item");
69-
}
70-
} else {
71-
// Global credential creation/editing requires admin permission
72-
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
73-
}
66+
// if (item != null) {
67+
// if (!item.hasPermission(Item.CONFIGURE)) {
68+
// return FormValidation.error("No permission to configure this item");
69+
// }
70+
// } else {
71+
// // Global credential creation/editing requires admin permission
72+
// Jenkins.get().checkPermission(Jenkins.ADMINISTER);
73+
// }
7474

75-
if (token == null || token.trim().isEmpty()) {
76-
return FormValidation.error("Field is required");
77-
}
78-
return FormValidation.ok();
79-
}
75+
// if (token == null || token.trim().isEmpty()) {
76+
// return FormValidation.error("Field is required");
77+
// }
78+
// return FormValidation.ok();
79+
// }
8080

8181
@POST
8282
public FormValidation doCheckTokenId(@AncestorInPath Item item, @QueryParameter String tokenId) {

0 commit comments

Comments
 (0)