It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

On the Service Desk portal page, how do I hide the "Help Center" link from users?

Steve Kirsch Aug 06, 2015

I want to customize the Service Desk Portal page, sort of described here: https://confluence.atlassian.com/display/Support/List+of+Service+Desk+Customizations+from+Atlassian+Support

When I go to any Service Desk Portal, I want to hide the "Help Center" link at the top of the page. We have a use case where we would like to obstruct users from linking to the Help Center (/servicedesk/customers/portals).

Can I do this via custom add-on development? 

8 answers

1 accepted

2 votes
Answer accepted

Hello Steve,

if you wanted to hide this link in all of your service desk portals, you could hide it using CSS.

Cheers,

Kirstin

Steve Kirsch Aug 13, 2015

Yes, that is what we ended up doing. We used a Servlet Filter plugin module to intercept the page and inject CSS to "display:none" for the appropriate elements.

Hi Steve,

Could you please explain or write example how to intercept page and inject CSS?

Steve Kirsch Mar 18, 2016

Sure. This works for Service Desk 2.5.9. We have not tried it with any JIRA 7 version of Service Desk. I adapted some code I found on stackoverflow for using a servlet filter to inject HTML: http://stackoverflow.com/questions/14736328/looking-for-an-example-for-inserting-content-into-the-response-using-a-servlet-f

Here is the servlet filter:

public class ServiceDeskCustomerFilter implements Filter {
    // Comment out until needed: private static final Logger LOGGER = LoggerFactory.getLogger(ServiceDeskCustomerFilter.class);
    private FilterConfig filterConfig = null;
    private static class ByteArrayServletStream extends ServletOutputStream {
        ByteArrayOutputStream baos;
        ByteArrayServletStream(ByteArrayOutputStream baos) {
            this.baos = baos;
        }
        public void write(int param) throws IOException {
            baos.write(param);
        }
    }
    private static class ByteArrayPrintWriter {
        private ByteArrayOutputStream baos = new ByteArrayOutputStream();
        private PrintWriter pw = new PrintWriter(baos);
        private ServletOutputStream sos = new ByteArrayServletStream(baos);
        public PrintWriter getWriter() {
            return pw;
        }
        public ServletOutputStream getStream() {
            return sos;
        }
        byte[] toByteArray() {
            return baos.toByteArray();
        }
    }
    public class CharResponseWrapper extends HttpServletResponseWrapper {
        private ByteArrayPrintWriter output;
        private boolean usingWriter;
        public CharResponseWrapper(HttpServletResponse response) {
            super(response);
            usingWriter = false;
            output = new ByteArrayPrintWriter();
        }
        public byte[] getByteArray() {
            return output.toByteArray();
        }
        @Override
        public ServletOutputStream getOutputStream() throws IOException {
            // will error out, if in use
            if (usingWriter) {
                super.getOutputStream();
            }
            usingWriter = true;
            return output.getStream();
        }
        @Override
        public PrintWriter getWriter() throws IOException {
            // will error out, if in use
            if (usingWriter) {
                super.getWriter();
            }
            usingWriter = true;
            return output.getWriter();
        }
        public String toString() {
            return output.toString();
        }
    }
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        this.filterConfig = filterConfig;
    }
    @Override
    public void destroy() {
        filterConfig = null;
    }
    /**
     * This method is where the "style" block is injected into the page to hide the Help Center links
     */
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        CharResponseWrapper wrappedResponse = new CharResponseWrapper ((HttpServletResponse)response);
        // TODO determine if the chain.dofilter really needs to be in the middle of this dofilter method
        chain.doFilter(request, wrappedResponse);
        byte[] bytes = wrappedResponse.getByteArray();
        if (wrappedResponse.getContentType().contains("text/html")) {
            // Have to use getWriter, so convert bytes back to String
            String out = new String(bytes,"utf-8");
            // DO YOUR REPLACEMENTS HERE
            // Injected <style> to hide two Help Center links:
            // One in the upper-left banner (a.sd-help-center) and another above the Service Desk title (.cv-breadcrumb-item)
            out = out.replace("</head>", "<style>.cv-breadcrumb-item,a.sd-help-center {display: none;}</style></head>");
            response.getWriter().write(out);
        } else {
            String out = new String(bytes,"utf-8");
            response.getWriter().write(out);
        }
    }
}

Of course, don't forget to modify your atlassian-plugin.xml to use your filter on the servicedesk customer pages:

<servlet-filter class="com.servlet.filter.ServiceDeskCustomerFilter" i18n-name-key="service-desk-customer-filter.name" key="service-desk-customer-filter" location="before-dispatch" name="Service Desk Customer Filter" weight="1">
    <description key="service-desk-customer-filter.description">The Service Desk Customer Filter Plugin</description>
    <url-pattern>/servicedesk/customer/*</url-pattern>
  </servlet-filter>
Laura Ivers Feb 07, 2017

Does this work with the cloud version of JIRA Service Desk?

AFAIK you can't add your own plugins on cloud, Laura.

Jineesh M G Nov 15, 2017

Is there any easy tutorial which describes the plugin development?

Please help.

 

MG

Robert Helstrom Jul 11, 2018

HELP! We have one customer-facing service desk. All the others are internal only. How do I remove the Help Center links from the one that is customer facing? 

BTW, the reason I need to do this is that the application doesn't behave as advertised. I set up a customer using my personal email address assigned to no organization. That customer has no access to any other service desk and yet, the Help Center links still appear for him and the Help Center shows links to the other service desks he supposedly doesn't have access to.

Robert Helstrom Jul 11, 2018

Also...the Help Center Corrector might have been a solution but it only works with the server app, not the cloud based app

Hi Robert,

You wrote: "...the Help Center shows links to the other service desks he supposedly doesn't have access to..."

To me it seems that you need to check your JIRA project permissions of your service desks.
We also have multiple service desks for different customers. The help center link is present, but the customers only can see the service desks they have access to. Service Desks from other customers are hidden.

We're on JIRA Server 7.9.2 / JIRA Service Desk 3.12.2.

Cheers,
Kirstin

Robert Helstrom Jul 12, 2018

Hi Kirstin - Thanks for your response. We're on the JIRA cloud so I'm not sure how that differs, though I know I've run into solutions (like the Help Center Corrector mentioned earlier in this thread) that only work with the server-based applications. I'll check the project permissions of the service desks, though. Thanks for that. 

2 votes
Tiffany Broadbent Jan 29, 2018

An even easier method - someone amazing has added a FREE add-on to hide the help center links from customers and also redirect its users to their correct portals. 

https://marketplace.atlassian.com/plugins/com.itransition.csam.helpcenter-corrector/server/overview

1 vote
Christopher Anderlik Nov 13, 2015

Hi Paulo,

regarding your guide:

Viewing all portals in your help center

If your company uses multiple service desk projects (e.g. an IT service desk and an office administration service desk), you can simply provide your customers with a single URL to find a list of all the customer portals they have access to and the requests created in each one: https://<domain_name>.atlassian.net/servicedesk/customer/portals 

 

-> What if all portals are public but I do not want that customers can see them in the global help center??

 

Thx.

Christopher

Mikkel Rostock Dec 01, 2015

Have same issue here - many customers with a help desk project each - don't want them to see all our other customer help desks...

Jineesh M G Nov 16, 2018

You can set proper permissions for User groups. In that way you can restrict users to view other portals. Even the "Help Center" link is there, users can only see the portals they have permission to view

Adrian Smyth Nov 16, 2018

Hi Jineesh, 

are you on Jira Cloud or Jira Server?

Do you mind sharing a screenshot to explain where you see the "Help Center" link, in the User Management>Groups?

Thanks

Jineesh M G Nov 16, 2018

There is not Help Center link in the User Management. What I am saying is we dont need to remove the "Help Center" global link from the Service Portal. Normally when the User click on the "Help Center" he can see all list of portals. If the user only have the access permission to portal 1, he could not see other portals like 2,3,4 etc. 

Thanks,

Jineesh

Adrian Smyth Nov 16, 2018

Yes, I agree, thanks for the clarification.

We have customer projects with restricted access to Groups only per customer site and we also have 2 generic public projects that are set up as open to any user lambda that needs to create an issue.

Project Settings>Customer permissions

Who can access the portal and send requests to the Support Desk?

- Customers my team adds to the project

- Anyone can send a request via the portal 

 

However, this can sometimes create confusion for the customer who can view the specific and generic portals being displayed in the list of portals available and they sometimes create an issue in the general public one by mistake. Atlassian should make it easier to manage this. 

Jineesh M G Nov 16, 2018

Ok. But I dont' think that is a big deal. Because you can mask the portal URL https://sodius.atlassian.net/servicedesk/customer/portal/6 with some other friendly URL like http://fiirst_client_support.yourdomain.com with the help of Apache/IIS proxy(This is not for cloud, you should have your own domain management). And each domain will directly go to the "portal/x" URL. Yes, still the user able to see the link but that will go to the available list of portal but that action intentionally done by the User. 

That is not a big deal right?

Adrian Smyth Nov 16, 2018

Yes, but unfortunately we're on Jira Cloud.

But you're right it's not a major issue, just a nice to have.

0 votes
Paulo Hennig Atlassian Team Aug 25, 2015

Hello Steve,
Notice that on the newer JIRA Service Desk versions, you can customize the Customer Portal (Hide "Help Center" or set another message) using the following guide:

 

Sumit Kumar Feb 25, 2016

I am using service desk 2.5.9 , how do I hide it ?

Dustin Chamberlain May 05, 2016

@Paulo Hennig How do you hide help center? I am also running SD 2.5.9 and do not see that option

Assistenza Aug 30, 2016

Can't find this option even in SD 3.1.9

Thomas Kurz Sep 07, 2016

Just upgraded our test system to 3.2 I can not see the option there either

 

Brianna Laub Sep 26, 2017

I'm not seeing the option either, anyone figure this out?

Tom Trevithick I'm New Here Apr 24, 2019

Having the same issue

0 votes
Markus Nov 18, 2015

Hi Paulo,

i can't find any function to hide the Help Center Link in our guide. 

Please, can you tell me how that works.
Thx
Markus
0 votes
Mamoru TASHIRO Dec 09, 2015

My other question https://answers.atlassian.com/questions/32970687 might help you. smile

 

Thank you,

TASH

0 votes
Karl Hennermann Feb 04, 2016

Paolo, AFAICS the link you provided does not actually say how to hide the the Help Center, could you please elaborate?

Also on that page there is a screenshot of a Help Center without the global search bar hidden. Again, how can we achieve this?

Thanks

Karl

Karl Hennermann Sep 07, 2016

Never mind, I found out how to get a Help Center without the global search bar: simply don't associate a Knowledge Base.

Thomas Kurz Sep 07, 2016

does not work for me, I do not have a knowledgebase attached to any service desk, and still ahve the help center button and people can wander all through the service desks

Karl Hennermann Sep 07, 2016

You are right, removing the Knowledge Base only hides the search bar, not the links to the Global Help Centre.

0 votes
Adrian Smyth Sep 08, 2017 • edited

Hi,
we are on JSD Cloud and I'm trying to customise the portal look and feel and wish to hide the "Find Help Forms" search box. If this is linked to the KB Confluence please note we don't have Confluence and so there is no option to activate/deactivate it.

Confluence.PNGFind Help Forms.PNG

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in United States

Topic Tuesday: Agile

Another week, another Topic Tuesday!  Agile has been on my mind a lot lately because I've seen good implementations and bad implementations, but now as a Jira admin it matters more to me whether...

40 views 0 0
View post

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you