Skip to content

Commit

Permalink
Merge pull request #557 from Dohbedoh/bugfix/addCredentials
Browse files Browse the repository at this point in the history
Adding credentials should not require a check on CredentialsStore#isDomainsModifiable
  • Loading branch information
jeromepochat authored Oct 11, 2024
2 parents 14660fe + 86ddfc9 commit d7abf5f
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -597,12 +597,6 @@ public WrappedCredentialsStore(@NonNull ContextResolver resolver, @NonNull Crede
@RequirePOST
@Restricted(NoExternalUse.class)
public JSONObject doAddCredentials(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException, ServletException {
if (!store.isDomainsModifiable()) {
hudson.util.HttpResponses.status(400).generateResponse(req, rsp, null);
return new JSONObject()
.element("message", "Domain is read-only")
.element("notificationType", "ERROR");
}
store.checkPermission(CredentialsStoreAction.CREATE);
JSONObject data = req.getSubmittedForm();
String domainName = data.getString("domain");
Expand Down

0 comments on commit d7abf5f

Please sign in to comment.