Skip to content

Commit

Permalink
Adding credentials should not require not require a check on Credenti…
Browse files Browse the repository at this point in the history
…alsStore#isDomainsModifiable
  • Loading branch information
Dohbedoh committed Sep 5, 2024
1 parent 0d8f3bb commit 1ed70d3
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(StaplerRequest req, StaplerResponse 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 1ed70d3

Please sign in to comment.