Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

In Qlik Sense Extension : how to select an app based on user?

Hi,

Here's a bit of context and scenario:

1. My end-users access: https://front-end-qlik-server and are redirected to a login page.

2. They proceed to enter their credentials, submit and are redirected to:

- https://front-end-qlik-server/extensions/ExtensionHome/ExtensionHome.html


3.
My site is built on a set of Qlik Sense Extensions between which the user can navigate:

- https://front-end-qlik-server/extensions/Extension1/Extension1.html

- https://front-end-qlik-server/extensions/Extension2/Extension2.html

- and so on...


4. These extensions are mashups that embed Qlik objects (sheets) and other HTML objects. These Qlik objects are taken from my Qlik Apps.


Depending on who the user is, I would like to display Qlik objects from different apps.


Example:

Users:

  • John (username: john)
  • Paul (username: paul)

Apps:

  • FirstApp: '11111111-1111-1111-1111-111111111111'
  • SecondApp: '222222222-2222-2222-2222-222222222222'

Sheets:

  • FirstApp and SecondApp both have a Sheet called "MySheet"


My scenario:

  • John logs in and goes to Extension1.html. The object displayed in the page is MySheet from FirstApp.
  • Paul logs in and goes to Extension1.html. The object displayed in the page is MySheet from SecondApp.


Is there a way to achieve this?

1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

Yeah, implement some kind of server-side store to resolve the mapping.

A more qlik related approach could be to just have a dummy app with usernames and app ids that utilizes section access to restrict the data.

View solution in original post

4 Replies
Alexander_Thor
Employee
Employee

You can use this method which gives you the authenticated user, http://help.qlik.com/en-US/sense-developer/3.1/Subsystems/APIs/Content/MashupAPI/Methods/getAuthenti...

Then you can implement some kind of user to app mapping.

Not applicable
Author

Thanks Alexander, I have been playing around with the getAuthenticatedUser and a user-to-app map that is hard coded in the JavaScript code for my Extension.

However, this means that when John's logged in, right-clicks and hits View Source Code in his browser, he will have access to the list of users. I don't really want John to know that Paul and George are also users. Worse: I'm giving him Paul and George's usernames and the apps they can access. Do you understand my concern?

Is there a more secure way of mapping users to apps for use in an Extension?

Alexander_Thor
Employee
Employee

Yeah, implement some kind of server-side store to resolve the mapping.

A more qlik related approach could be to just have a dummy app with usernames and app ids that utilizes section access to restrict the data.

Not applicable
Author

OK, thanks for the tip. I will give the dummy app approach a try.