Skip to content

Commit

Permalink
Adding credentials should not require a check on CredentialsStore#isD…
Browse files Browse the repository at this point in the history
…omainsModifiable
  • Loading branch information
Dohbedoh committed Sep 9, 2024
1 parent 0d8f3bb commit 8dc8ff6
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 8dc8ff6

Please sign in to comment.