Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'd like to hide a sheet inside an app when the user is on a mobile browser.
I was able to create a security rule to identify user Operating System (environment.os ) and user device, for instance, when it's an Ipad or iPhone (environment.device)
**I still need to isolate users on Android on Tablets from the ones on smartphones.
Reference:
Check this one, maybe this could help:
https://deviceatlas.com/blog/list-of-user-agent-strings
BR
Gio
Hi, I tried to use environment.browser like "*Mobile*" and it didn't work.
Based on the online help, I understand that qlik only returns Browser name and version.
BR
Erich
Interesting, it should take that, let me go ahead and replicate it, If I do bug it with R&D.
BR
Gio
Hi,
Please, Keep me informed of the progress
Best Regards,
ERich
There is a high degree of difficulty here. From first principles, Qlik Sense was designed to be mobile ready by using responsive design in the front end UI. So it doesn't make much sense to restrict mobile users. That being said, this is confirmed to be working on my Qlik Sense February 2019 Patch 1 deployment.
Initial Configuration:
Application Configuration:
Security Rule Configuration:
Result:
Chrome Desktop:
iPhone:
Android:
Debugging notes:
I will say that these rules work for me, but you will need to confirm things precisely in your environment. Copying and pasting the rules may work, but may not. This style of deployment will require you to look into the logs mentioned above to confirm elements.
For example here are the Message column entries for the devices I tested (bolded elements are apt to be used in a rule):
iPhone: Headers that will be injected: [X-Qlik-Security, OS=Mac OS X; Device=iPhone; Browser=Safari 12.1; IP=::ffff:192.168.1.66; ClientOsVersion=Unknown; SecureRequest=false; Context=AppAccess; ] ...
Desktop: Headers that will be injected: [X-Qlik-Security, OS=Windows; Device=Default; Browser=Chrome 73.0.3683.103; IP=::ffff:192.168.1.71; ClientOsVersion=10.0; SecureRequest=false; Context=AppAccess; ]...
Android: Headers that will be injected: [X-Qlik-Security, OS=Linux; Device=Default; Browser=Chrome 73.0.3683.90; IP=::ffff:192.168.1.99; ClientOsVersion=Unknown; SecureRequest=false; Context=AppAccess; ]...
Once you have these details from the devices that you want to show the sheet to, then you can use them to fuel a security rule.
BTW I ask @Levi_Turner on this one, since is waaaaayy smarter than me on security rules. Thanks Levi!
Gio
Hi @Levi_Turner,
Thank you for your explanation, it really is very helpful! Right now I'm using "environment.os!=Windows" to see if the user is using a mobile device, and is working so far because everyone in the organization uses Windows, but if someone starts using a Macbook or a Linux computer then this rule will not work as intended.
I found this article: https://support.qlik.com/articles/000097034 and it says that the user-agent string contains information like QlikSenseMobile for iOS devices or Android, but I cannot find the attribute to match it with. Is there a way to use this information in the security rule?