Follow these simple steps:
- Install the Page Markup Plugin
- Go to Manage Jenkins > Configure System
- For Header HTML in the Additional Page HTML Markup section, put:
Note that the image referenced here does not come with Jenkins and needs to be put in the userContent folder.<div id="my-banner" align="center" style="display:none;"> <p /><img src="/userContent/error.png" /><b>You are not logged in. To start a job or make changes you must log in. If you do not have an account, you can <a href="/signup">sign up</a> for one.</b> </div>
- For Footer HTML in the Additional Page HTML Markup section, put:
<script type="text/javascript"> function loggedIn() { var x; x = document.getElementById('login-field') if(x.innerText) { x = x.innerText; }else{ x = x.textContent; } return (x.indexOf('log out') > 0); } if (!loggedIn()) { document.getElementById('my-banner').style.display = 'block'; } </script>
- Hit Save