mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-03 15:15:54 +00:00
Merge pull request #2146 from olivergondza/hide-management-link
[FIXED JENKINS-33683] - Fix Management link hiding
This commit is contained in:
commit
ac566a91e4
7 files changed
+57
-16
No files matched your search
@@ -1532,10 +1532,12 @@ public class Functions {
|
||||
/**
|
||||
* Computes the hyperlink to actions, to handle the situation when the {@link Action#getUrlName()}
|
||||
* returns absolute URL.
|
||||
*
|
||||
* @return null in case the action should not be presented to the user.
|
||||
*/
|
||||
public static String getActionUrl(String itUrl,Action action) {
|
||||
public static @CheckForNull String getActionUrl(String itUrl,Action action) {
|
||||
String urlName = action.getUrlName();
|
||||
if(urlName==null) return null; // to avoid NPE and fail to render the whole page
|
||||
if(urlName==null) return null; // Should not be displayed
|
||||
try {
|
||||
if (new URI(urlName).isAbsolute()) {
|
||||
return urlName;
|
||||
|
||||
Reference in new issue
Block a user