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-73941 - ForceSandbox - Unify logic in Script-Security for reducing techDebt #586

Merged
merged 8 commits into from
Nov 13, 2024

Conversation

jgarciacloudbees
Copy link
Contributor

@jgarciacloudbees jgarciacloudbees commented Oct 31, 2024

JENKINS-73941 - - Option to hide "Use Groovy Sandbox" for users without Administer permission globally in the system

Complements:
#584
#585

After releasing jenkinsci/workflow-cps-plugin#948 we have realized that some logic can be unified between Script-Security and Workflow-CPS plugin.

To do so, we have created the new static methods:

  • org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval#shouldHideSandbox
  • org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval#validateSandbox

This PR does not include any new functionality, but decrease the techDebt maintaining both, Script-Security and Workflow-CPS Plugin

Testing done

Created new test cases for the created methods.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@jgarciacloudbees jgarciacloudbees requested a review from a team as a code owner October 31, 2024 09:49
@jglick jglick requested a review from amuniz November 1, 2024 11:48
@jglick jglick merged commit 9b98a4e into jenkinsci:master Nov 13, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants