Skip to content
Philipp Frenzel edited this page Dec 16, 2013 · 26 revisions

General

QlikView Rights depends on two types of user rights:

  1. The frontend user rights which are defining the visibility of objects to the user
  2. The backend user rights which are restricting the data by "section access"

Frontend Rights

Introduction

The visibility of objects in QlikView can be set to "true" or "false" by value or expression. So to make it managable, we need to create a dynamic expression, that will hold the information of the current user, the object included into the document and the information if he has the rights or not.

Folder Structure

To get rights running, you need to define the values for some variables, which will be used by the macros to load and write data. As the solution reads from the -prj folder, you need to create one for the document you wanna manage with rights. The running macros will create some folders, so pls. be prepared to find folder with the prefix "_rights" - if you wanna take a look inside, pls. be prepared that you need to be a skilled developer, to understand what is happening inside. As we use the files inside the "_rights"-folders to store settings, users, etc. a change or delete can be complete "kill" for the system.

Setting the formulas

The "creation" of the visibility formula is created by a macro called loop sheets. As you execute it, it will loop through the whole qlikview document, check all objects based on each sheet and if possible write the "visibility" to the objects. The string for the comparision looks like:

=if(only({<RightRule={'$(=OSUser())Document\SH04_789130639Document\CH01_016245194'}>} RightAccess)=1,1,0) Based upon the settings of the Administrator the "RightRule"-field will contain a matching string where the OSUser() ist filled by the user rights definition.

Installation

To setup the system, you need to "include" all needed scripts and macros to your document. <<TODO: needs to be described more in detail>>

After this is done, you need to go to the settings section and work on the initial settings for your qlikview document:

`` vba SET varDocumentFormula = "DocumentName()"; SET varSheetFormula = "GetActiveSheetId()"; SET varCurrentUser = "OSUser()";

SET varNTDomain = "FRENZELSRV2008"; SET varFileXLSRights = ".\RightsAdmin.xlsx"; SET varStringDocumentName = "=DocumentName()";

SET varStringQVDocumentPath = "TestSources"; SET varStringQVDocument = "Weather";

//Variables for the ExportObjectMakro Let pstrExpObject = 'CH01_016245194'; Let pstrExpPath = replace(DocumentPath(),DocumentName(),'') & 'rights' & varStringQVDocument; Let pstrFileName = num(now()); ``

Clone this wiki locally