Commit Graph

371 Commits

Author SHA1 Message Date
Jesse Glick a9ca5ef3d4
[JEP-227] Replace Acegi Security with Spring Security & upgrade Spring Framework (#4848)
Replacing Acegi Security with Spring Security

Co-authored-by: Tim Jacomb <timjacomb1+github@gmail.com>
Co-authored-by: James Nord <jtnord@users.noreply.github.com>
2020-11-06 11:30:25 -07:00
Jeff Thompson 27a71f981b A step towards removing more 'slave' terminology.
Overload the mechanisms for obtaining the jenkins-agent.jnlp (formerly slave-agent.jnlp) file for launching inbound TCP agents.
Serve the file at either of the two locations.
Change the UI (etc.) documentation to reference the correct term / file.
2020-10-16 15:48:17 -06:00
StefanSpieker 93428a432d
Fix deprecation warnings + Update ArtifactArchiver to no longer consult with environment variables injected by EnvironmentContributingActions during the build (#4933)
* fixed deprecation warnings

* reverted changes

* fixed typeo in javadoc

* Update core/src/main/java/hudson/tasks/ArtifactArchiver.java

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Update core/src/main/java/hudson/cli/BuildCommand.java

Co-authored-by: Jesse Glick <jglick@cloudbees.com>

* fixed imports

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2020-10-14 17:05:42 +02:00
Daniel Beck c632f42f07
Update at-since Javadoc (#4877)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2020-08-01 08:33:48 +01:00
Félix Queiruga fb7f8903c3
[JENKINS-63002] Revamp tabs and bigtables (#4835)
Co-authored-by: Tim Jacomb <timjacomb1+github@gmail.com>
2020-07-19 09:23:25 +01:00
StefanSpieker 463cd113ba
Minor refactorings either for performance or readability (#4845)
Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2020-07-17 15:14:46 +01:00
Tim Jacomb 634004a648
JENKINS-61206 System read / Extended read for agents (#4531)
* JENKINS-61206 System read / Extended read for agents

* Update core/src/main/java/hudson/Functions.java

* Set permission to false explicitly

* Add message when no configured clouds

Otherwise there was a white page and it looked weird

* Hide password for Computer.EXTENDED_READ

* Add test

* Access controlled simplification

* Fix typoes  / simplify code

* Simplify task.jelly

* Allow filtering system info extensions

* Show link that should be present

* Adjust MasterComputer access

* Adjust javadoc

* Adjust MasterComputer#configure

* Change links when read only access

* Use it instead of app

* Update core/src/main/resources/hudson/model/Computer/configure.jelly

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

* Code simplification

* Inline jelly text customisation

* Allow system read to see cloud move blurb

* Tooltip based on permission

Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2020-05-24 06:58:27 +01:00
Daniel Beck 8a9a1b2f7b
[JENKINS-61808] Always transmit f:password values as Secret (#4630)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2020-05-10 11:17:51 +02:00
Daniel Beck d24b1df0d8 Fill in further 'since' TODO comments 2020-05-03 16:28:37 +02:00
James Nord 1f946961b9 s/javax.annotation.CheckForNull/edu.umd.cs.findbugs.annotations.CheckForNull/g 2020-03-26 16:12:35 +00:00
James Nord 819f80b12f s/javax.annotation.Nonnull/edu.umd.cs.findbugs.annotations.NonNull/g 2020-03-26 11:14:41 +00:00
James Nord a7fcc8e447 s/javax.annotation.Nullable/edu.umd.cs.findbugs.annotations.Nullable/g 2020-03-26 11:11:22 +00:00
Daniel Beck c4f90b7dbd Update at-since up to and including 2.226 2020-03-16 14:22:38 +01:00
Daniel Beck 7259d8698c [JENKINS-61465] Make checkAnyPermission work on non-AccessControlled 2020-03-13 12:31:45 +01:00
Oleg Nenashev 9537ee5154
Show plugin release date in plugin manager (#4535)
* Show plugin release date in plugin manager

* Add at-since

Co-Authored-By: Oleg Nenashev <o.v.nenashev@gmail.com>

* Make sorting work property

- Sort independently of sortable.js date parsing magic
- Hide categories when sorting by release date

* Show friendlier labels for the age of plugin releases

Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2020-03-05 10:09:14 +01:00
Daniel Beck 3472e10e95
Remove 'auto refresh' feature (#4503)
* Remove 'auto refresh' feature

* Remove obsolete CSS
2020-02-24 16:18:00 +01:00
Tim Jacomb 991f379924
JEP-224 Minimal system read (#4506)
Co-Authored-By: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2020-02-22 15:27:52 +00:00
Félix Queiruga 673a18c637
[JENKINS 60920] header breadcrumbs CSS update (#4463)
* New styles for breadcrumbs and warnings monitor

* Adds the svgxuse polyfill for svg sprites on IE 11

* Created new styles for the page header

- Used the material icons svg sprites to deliver the icons
- Icons are rendered using a <svg> tag

* Create new base styles file and undo changes to the layout-common and style css files

* Fixes and refactor for the new UI CSS code

* Make the new header color and logo section opt-in

- The new UI can be toggled with the -Dui.enableNewUi=true flag

* Rename and refactor the page-header css

- Rename the css class namespace from .main-header to .page-header
- Page header CSS moved into a modules folder and now included on the new-base-styles.css. This is done to avoid loading a separate file everytime.
- Extracted color variables to their own file

* Updated localization for header and admin monitor

- The pageHeader template receives localization strings as props
- Missing translation for the admin monitor on the it, bg and pl locales

* Update core/src/main/resources/lib/layout/layout.jelly

Co-Authored-By: Tim Jacomb <t.jacomb@kainos.com>

* Most measurements migrated to REMs

* Code cleanup and apply new-ui toggle to the html.jelly file

* Breadcrumb fixes

- Reverts breadcrumb link styling to use nested selectors instead of the .breadcrumbs__link class. The reason is that several plugins would break.
- Shifted margins so that breadcrumbs can be fullwidth in the absence of the auto refresh link

* Implemented some fixes from the feedback received

- Removed box shadow webkit prefix
- Fixed formatting on the breadcrumbs.css and layout-commons.less files
- Renamed the new UI toggle class from _new-ui_ to _ui-refresh_
- Renamed references to the _new ui_ to _v2_

* Created jelly helper to use svg icons

* Fix: restore proper icon for the user on the header

* Fixes for Edge, IE 11 and IE 10

* Improvements on the header and breadcrumbs

- Logo v2 changed and optimized using the svgo frontend https://jakearchibald.github.io/svgomg/
- Refactored the ammonitor insertion code
- Breadcrumbs are no longer capitalized
- Classic logo link no longer stretches past the images
- Fixed classic logo link on IE11
- Updated color of the footer
- Menu items background is also changed when hovering over the menu selector
- Removed copyright notice on top of some files

* Bumped JTH version with the SVG download fix

* Update test/pom.xml

Co-Authored-By: Tim Jacomb <t.jacomb@kainos.com>

* Added a function to check boolean system properties from jelly

* Fix header links and add svg styles for legacy layout

*  Some bug fixing for the new header

- The ui-refresh changes were not properly being enabled with the boolean system property. Added explicit true check on the jelly templates.
- Added an explicit width for the ui-refresh logo because it would mess with the layout

* Update core/src/main/java/hudson/Functions.java

Co-Authored-By: Adrien Lecharpentier <adrien.lecharpentier@gmail.com>

* Do not check the system property on every page render

Co-authored-by: Tim Jacomb <t.jacomb@kainos.com>
Co-authored-by: Adrien Lecharpentier <adrien.lecharpentier@gmail.com>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2020-02-20 16:57:47 +00:00
Daniel Beck 9c8a44ca34 Rename to #getRequiredGlobalConfigPagePermission to disambiguate 2020-02-18 12:41:00 +01:00
Daniel Beck 042dc75a8f For consistency with ManagementLink, name this #getRequiredPermission() 2020-02-14 21:55:18 +01:00
Daniel Beck 55b2bc7f3f [JEP-223] Overall/Manage permission
Co-Authored-By: Esther Alvarez Feijoo <ealvarez@cloudbees.com>
Co-Authored-By: aHenryJard <ajard@cloudbees.com>
Co-Authored-By: michael cirioli <mikecirioli@gmail.com>
2020-02-14 19:37:32 +01:00
StefanSpieker bef9ded543 [JENKINS-36720] - Fix Spotbugs issues (SE_COMPARATOR_SHOULD_BE_SERIALIZABLE, ES_COMPARING_STRINGS_WITH_EQ) (#4379)
* fixed Spotbugs issues (SE_COMPARATOR_SHOULD_BE_SERIALIZABLE, ES_COMPARING_STRINGS_WITH_EQ)

* replaced wildcard import with specific imports

* added missing import

* fixed spotbugs issues

* removed accidently added import
2020-01-11 00:04:02 +01:00
Thomas de Grenier de Latour d36acc1c81 [JENKINS-59656] check build id before interrupting from the executors widget (#4264)
* [JENKINS-59656] when stopping a Run via the executors widget, make sure it's the intended one

* [JENKINS-59656] added Executor.stopBuild(String) instead of .stop(String)

* revert change to deprecated doStop(StaplerRequest,StaplerResponse), useless now that it's doStopBuild(String) which takes a runExtId parameter

* javadoc: "@since TODO" rather than "@since 2.???"

* [JENKINS-59656] added test case

* jelly cleanup with h.urlEncode(String)

* make Functions.urlEncode(null) return empty String

* Executor.doStopBuild(runExtId): ignore runExtId if executable is not a Run

* Executor.doStopBuild(runExtId) doesn't have to be a public API
2019-12-10 22:44:51 +01:00
Stefan Spieker 40206e023c removed some redundant constructs and replaced stringbuilder operations with too few arguments with string concatenation 2019-11-24 16:15:20 +01:00
StefanSpieker d92b172aaf Set the HttpOnly flag for the page auto-refresh tokens (#4363)
* set HttpOnly flag to prevent cookie read by a malicious script in browser

* Update core/src/main/java/hudson/Functions.java

Co-Authored-By: Wadeck Follonier <Wadeck@users.noreply.github.com>
2019-11-22 10:14:17 +01:00
Daniel Beck 90e693b13b Hide password form fields by default (#3991)
* Hide password form fields by default

* Trying to bypass enforced autocompletion by just having a test field at first

Something like onfocus didn't work, you'd tab through form elements
and unless you filled in the user name, changing the form field to
password would cause it to autocomplete.

It looks like, at least in Mac/Firefox, going from plain text to password
in the 'oninput' event handler works. The plain text is revealed neither
with typing nor pasting.

* Update core/src/main/resources/lib/form/password.jelly

Co-Authored-By: daniel-beck <daniel-beck@users.noreply.github.com>

* Use previously defined value

* Make new password form fields opt-out

* Add support for redacting form secrets in new password field

* Have a password value pre-set in Jelly

* Fix method

* Fix test by clicking on the button to change the password

* Forgot period separator between class and property name
2019-11-13 10:22:40 +01:00
silent-snowman 02522d257c [JENKINS-19887] - Allow time zone to be set on a per user basis (#4113)
* Implement user setting for timezone

* Apply timezone everywhere

* Revert to medium dateStyle

* Simplify and cleanup

* Add javadocs and fix file headers

* Revert auto-changes by IntelliJ

* Add nullable annotation

* Use better display names

* Add tests

* Log a warning when the user's time zone is not valid

* Add username to log statement

* Make suggested change

* Cleaner way of dealing with invalid timezone

* Update core/src/main/resources/hudson/model/TimeZoneProperty/config.jelly

Co-Authored-By: Matt Sicker <boards@gmail.com>

* Update tests

* Update config.properties

* Update config.jelly

* Update Functions.java

* Update layout.jelly

* Update Functions.java

* Update TimeZoneProperty.java

* Update TimeZoneProperty.java

* Update config.jelly

* Update config.properties

* Update TimeZonePropertyTest.java

* Update TimeZoneProperty.java

* Update Functions.java
2019-11-01 01:28:28 +03:00
Daniel Beck e084ac66bd
Merge pull request #3894 from daniel-beck/auto-refresh-telemetry
Add telemetry for 'auto refresh' feature
2019-10-24 23:46:16 +02:00
Daniel Beck d6c58cfdb6 Add changes from 2.200 2019-10-16 12:22:25 +02:00
Daniel Beck 14b9462d00 Increase logging level to be visible 2019-10-13 01:41:16 +02:00
Daniel Beck f8df1cd432 Address review feedback 2019-10-13 01:11:29 +02:00
Daniel Beck 2b618f36c2 Add telemetry for 'auto refresh' feature 2019-10-13 01:11:29 +02:00
Thomas de Grenier de Latour 96cc9ce0c5 added Functions.urlEncode(String) (#4278) 2019-10-11 09:31:40 +02:00
Oleg Nenashev 531972f113
Merge pull request #4243 from res0nance/infer-types
Use type inference instead of specifying it
2019-10-02 09:46:53 +02:00
Raihaan Shouhell e5d578b617 Use type inference instead of specifying it 2019-10-01 13:30:39 +08:00
Stefan Spieker d408627e9f changed order for compare instead of negating result (Spotbugs RV_NEGATING_RESULT_OF_COMPARETO) 2019-09-29 10:51:34 +02:00
StefanSpieker a26a5db1cf [JENKINS-59164] - `Functions#toEmailSafeString()` was not really sanitizing the email string (#4185) 2019-09-04 09:30:34 +02:00
Egor18 a9ce57a4e3 Fix always false condition 2019-08-21 00:52:39 -04:00
Jeff Thompson 5731d50d7d Merge branch 'security-stable-2.176' into security-master 2019-07-02 12:43:01 -06:00
Jeff Thompson c31c413865 Merge branch 'security-stable-2.164' into security-stable-2.176 2019-07-02 12:33:27 -06:00
Jeff Thompson ee4ca74771 Merge branch 'security-stable-2.150' into security-stable-2.164 2019-07-02 12:30:25 -06:00
Jeff Thompson 26d65fcbfd Merge branch 'security-stable-2.138' into security-stable-2.150 2019-07-02 12:29:52 -06:00
Matt Sicker 279d8109ed [SECURITY-534] 2019-07-02 12:27:48 -06:00
Gustavo de Souza Bezerra 0e62b68012 [JENKINS-57678] - Change getInstance() (deprecated) to get() (#4042)
* Change getInstance() (deprecated) to get()

* Reverting modifications according review

* Changing for use the variable
2019-06-27 17:24:45 +02:00
Daniel Beck b206e3c588 Remove UI helper function 2019-04-04 22:04:10 +02:00
Daniel Beck 03720d6c83 [FIX JENKINS-40750] Remove cc.xml from core 2019-04-04 22:00:53 +02:00
Josh Soref 264980c707 Java 7: omit explit type in favor of <> 2019-02-20 21:51:03 -05:00
Josh Soref 64ab6e48b5 No need for a boxed double 2019-02-20 21:44:55 -05:00
Jesse Glick a972c43982 Merge pull request #3757 from jglick/generateConsoleAnnotationScriptAndStylesheet
[JENKINS-38719] Console note/annotator script.js URLs must include SESSION_HASH

(cherry picked from commit 0331d47d60)
2018-11-21 09:49:48 +01:00
Matt Sicker f89df720ca Merge branch 'master' into simple-footer-decorators 2018-11-15 15:32:01 -06:00