[SOLVED] Disable Polarion for certain Webbrowsers

Description
SteffPoint
Posts: 80
Joined: Wed Mar 07, 2018 1:06 pm
Location: Germany

[SOLVED] Disable Polarion for certain Webbrowsers

Postby SteffPoint » Mon Aug 05, 2019 5:06 am

Is there any possibility to make Polarion only accessible to certain Webbrowsers (for example "Chrome") / deny certain webbrowsers (for example Internet Explorer) to access to Polarion?

Background: We have made experiences, that some Polarion functions do not properly work in Internet Explorer (but in Chrome) and therefore we want to show a warning message when any operator tries to access Polarion with IE. (As I know, the software dev team of Polarion also suggests to use Google Chrome for working in Polarion).

Maybe there is any way via the apache configuration? As I am not very experienced about Apache I would be thankful for rookie-friendly responses :wink:
Last edited by SteffPoint on Tue Aug 06, 2019 7:50 am, edited 1 time in total.

micdal
Posts: 30
Joined: Thu Feb 09, 2012 6:22 am

Re: Disable Polarion for certain Webbrowsers

Postby micdal » Mon Aug 05, 2019 6:05 am

Hi,

I also do not have a lot experience about Apache, but have you thought about a pop-up message to inform the user that he is using the wrong browser?

You could do this by using the following javascript code

Code: Select all

    <script type="text/javascript">
      browserName = navigator.userAgent;
      if (browserName.indexOf('Chrome') >= 0 ) {
        alert('You are running Chrome!');
      }
    </script>


Maybe that's only a quick "workaround" until somebody else posts a solution via Apache...

Regards,
Michael

SteffPoint
Posts: 80
Joined: Wed Mar 07, 2018 1:06 pm
Location: Germany

Re: Disable Polarion for certain Webbrowsers

Postby SteffPoint » Mon Aug 05, 2019 9:11 am

Hello Michael,

thank you very much for your idea. Is there any way to make sure the JavaScript-Code is executed on every single Polarion page? In other words: Where to best embed it?

Thanks

micdal
Posts: 30
Joined: Thu Feb 09, 2012 6:22 am

Re: Disable Polarion for certain Webbrowsers

Postby micdal » Mon Aug 05, 2019 10:20 am

Hi,

to be honest, I dont know where the javascript code could be placed.
I thought 'index.html' in the apache dir would be the right place, but that didn't work.
Sorry that I couldn't be a help.

Regards,
Michael

Jürgen
Posts: 104
Joined: Tue Sep 12, 2017 1:02 pm

Re: Disable Polarion for certain Webbrowsers

Postby Jürgen » Tue Aug 06, 2019 5:28 am

Hi

Polarion already has some functionality that is testing Browser compatibility during login. If for example Flash is not installed, Polarion tells the user that "the browser is not fully compatible".

Maybe you can find that and adapt the code for it.

But I would vote against doing it, because in the last year Polarion had problems with every browser at some point. In Chrome the links in a document table of contents did not work, in Firefox copy & paste was broken, and others. So you should probably only give recommendations to the users which browser normally works best.

SteffPoint
Posts: 80
Joined: Wed Mar 07, 2018 1:06 pm
Location: Germany

Re: Disable Polarion for certain Webbrowsers

Postby SteffPoint » Tue Aug 06, 2019 5:41 am

Hello Jürgen,

thank you very much for your honest opinion and the hint.

Maybe I do change the solution then to any kind of information appearing when using Polarion on Internet Explorer.

vanliers
Posts: 8
Joined: Wed Sep 12, 2018 12:01 pm

Re: Disable Polarion for certain Webbrowsers

Postby vanliers » Tue Aug 06, 2019 7:15 am

Hi,

there is one page you can place your code, if you are not going to modify polarion browser check code:
<InstallDir>\polarion\plugins\com.polarion.portal.jetspeed_3.19.1\webapps\jetspeed\index.jsp

This is the general portal page, when the user is logged in.

Note: With every Polarion Update you loose your changes.

regards, Stefan

SteffPoint
Posts: 80
Joined: Wed Mar 07, 2018 1:06 pm
Location: Germany

Re: Disable Polarion for certain Webbrowsers

Postby SteffPoint » Tue Aug 06, 2019 7:49 am

Hello Stefan,

wow, this is amazing! I was always seeking for a possibility how to edit the source from login and index page.

I will simply embed a div at top of the body with an information, that Polarion provides a better User Experience using Google Chrome webbrowser.

About Update losses: No problem, I have already created several "after-Polarion-update-Batch-files", which automatically update (write into) the relevant files again.


Thanks to all of you for the very amazing help! I really appreciate it.


Kind Regards,
Steffen

SteffPoint
Posts: 80
Joined: Wed Mar 07, 2018 1:06 pm
Location: Germany

Re: [SOLVED] Disable Polarion for certain Webbrowsers

Postby SteffPoint » Tue Aug 06, 2019 8:40 am

As some final note, I have added following Code to the login.jsp right after the <body>-Tag was opened:

Code: Select all

<div id="TestDIV" style="border: 1px solid black; background-color: #FF9999; width: 100%; height: 30px; padding: 10px; font-size: 20px; display:none;">&#8505;&nbsp;&nbsp; Polarion provides a better User Experience using Google Chrome Webbrowser</div>

    <script>
   if (navigator.appName == 'Microsoft Internet Explorer' ||  !!(navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/rv:11/)) || (typeof $.browser !== "undefined" && $.browser.msie == 1))
   {
     document.getElementById("TestDIV").style.display = "block";
   }
   </script>


This displays (only in) Internet Explorer following <div>:

Image


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: zd11 and 8 guests