Show only accessible links in sidepanel for new manage Jenkins UI - #27228
Show only accessible links in sidepanel for new manage Jenkins UI#27228mawinter69 wants to merge 1 commit into
Conversation
fixes jenkinsci#27227 Introduce a new method `hasRequiredPermission` that defaults to using `getRequiredPermission` similar to the the permission checks for administrative monitors
|
The spotbugs issues is pre-existing. Not introduced by this change |
|
hey @mawinter69 , @SInCE TODO should be replaced with the target Jenkins core version before merge. Based on the current development version, this should be @SInCE 2.577. |
No, the |
Thanks for the clarification! Understood — I wasn't aware that @SInCE TODO is intentionally updated after the first release containing the API. I'll withdraw that comment. |
|
Could we add an automated test covering the permission filtering introduced here? In particular, it would be useful to verify that a user with Overall/Read + Job/Read does not see AboutJenkins, ConfigureLink, or SystemInfoLink, while StatisticsLink remains visible. This would help prevent regressions in the new hasRequiredPermission() behaviour. |
fixes #27227
Introduce a new method
hasRequiredPermissioninManagementLinkthat defaults to usinggetRequiredPermissionsimilar to the the permission checks for administrative monitorsPlugins should override this (e.g. Casc plugin)
Testing done
Interactive testing
Screenshots (UI changes only)
Before
After
Proposed changelog entries
Proposed changelog category
/label bug
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@mention
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered.