Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-72611] Forbid updating credentials ID for IdCredentials #369

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

yaroslavafenkin
Copy link
Contributor

See JENKINS-72611.

#366 caused regressions, so this is another take.

Proposed changelog entries

  • Forbid updating credentials ID for IdCredentials

Submitter checklist

  • JIRA issue is well described
  • Changelog entry appropriate for the audience affected by the change (users or developer, depending on the change).
    * Use the Internal: prefix if the change has no user-visible impact (API, test frameworks, etc.)
  • Appropriate autotests or explanation to why this change has no tests

@yaroslavafenkin yaroslavafenkin requested a review from a team as a code owner January 29, 2024 13:00
@yaroslavafenkin
Copy link
Contributor Author

Complementing jenkinsci/credentials-plugin#506

@@ -524,6 +524,11 @@ private synchronized boolean updateCredentials(@NonNull Domain domain, @NonNull
checkPermission(CredentialsProvider.UPDATE);
Map<Domain, List<Credentials>> domainCredentialsMap = getDomainCredentialsMap();
if (domainCredentialsMap.containsKey(domain)) {
if (current instanceof IdCredentials && replacement instanceof IdCredentials) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jtnord jtnord requested a review from a team January 29, 2024 14:16
@jtnord jtnord merged commit 233481b into jenkinsci:master Feb 1, 2024
15 checks passed
@jtnord jtnord added the bug label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants